Skip to content

Migrate existing regular expression checks to RegexMatchers. - #6262

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1009639525
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1009639525

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Migrate existing regular expression checks to RegexMatchers.

Replace duplicated regular expression class-name strings and method matchers in AbstractPatternSyntaxChecker, InvalidPatternSyntax, StringSplitter, JdkObsolete, UnnecessarySetDefault, WellKnownMutability, and ConstantExpressions with shared definitions from RegexMatchers. Using NON_CLOSEABLE_PATTERN_CLASSES also records org.safere.Pattern as immutable in WellKnownMutability and treats static factory methods on com.google.re2j.Pattern and org.safere.Pattern as pure in ConstantExpressions.

Replace duplicated regular expression class-name strings and method matchers in `AbstractPatternSyntaxChecker`, `InvalidPatternSyntax`, `StringSplitter`, `JdkObsolete`, `UnnecessarySetDefault`, `WellKnownMutability`, and `ConstantExpressions` with shared definitions from `RegexMatchers`. Using `NON_CLOSEABLE_PATTERN_CLASSES` also records `org.safere.Pattern` as immutable in `WellKnownMutability` and treats static factory methods on `com.google.re2j.Pattern` and `org.safere.Pattern` as pure in `ConstantExpressions`.

PiperOrigin-RevId: 1009639525

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant