We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have something like:
public final class RegexHelpers { private RegexHelpers() { } public static Pattern getUnescapedSymbolPattern(char symbol) { return Pattern.compile(getUnescapedSymbolRegex(symbol)); } public static String getUnescapedSymbolRegex(char symbol) { String escapedSymbol = Pattern.quote(String.valueOf(symbol)); return "(^|[^\\\\])(\\\\\\\\)*" + escapedSymbol; // (^|[^\\])(\\\\)*, } }
Which gives a NON_STATIC_PATTERN_COMPILE_CALL.
NON_STATIC_PATTERN_COMPILE_CALL
I also have another case of a false positive in code like:
private boolean propertyMatchesText(String test, String text, boolean shouldMatchWholeString) { String pcre = SomeHelpers.textToPcre(text, shouldMatchWholeString); int caseInsensitiveFlag = isCaseInsensitive() ? Pattern.CASE_INSENSITIVE : 0; Pattern pattern = Pattern.compile(pcre, caseInsensitiveFlag | Pattern.UNICODE_CASE); return pattern.matcher(test).find(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have something like:
Which gives a
NON_STATIC_PATTERN_COMPILE_CALL
.I also have another case of a false positive in code like:
The text was updated successfully, but these errors were encountered: