private boolean isRedundant(@NotNull String str, PsiExpression pattern, boolean literalMatch) {
        Object constValue = ExpressionUtils.computeConstantExpression(pattern);
        if (constValue != null) {
          return isRedundantLiteralMatch(str, constValue, literalMatch);
        }
        if (literalMatch && pattern instanceof PsiPolyadicExpression &&
            ((PsiPolyadicExpression)pattern).getOperationTokenType().equals(JavaTokenType.PLUS)) {
          PsiExpression[] operands = ((PsiPolyadicExpression)pattern).getOperands();
          boolean stringType = false;
          for (int i = 0; i < operands.length; i++) {
            PsiExpression operand = operands[i];
            stringType = stringType || TypeUtils.isJavaLangString(operand.getType());
            if (!stringType && (i > 0 || !TypeUtils.isJavaLangString(operands[1].getType()))) continue;
            constValue = ExpressionUtils.computeConstantExpression(operand);
            if (constValue == null) continue;
            if (isRedundantLiteralMatch(str, constValue, true)) return true;
          }
        }
        return false;
      }
private boolean isRedundant(@NotNull String str, PsiExpression pattern, boolean literalMatch)