You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4c56260
Browse filesBrowse the repository at this point in the historyBrowse files
Hoist visitor matchers and regexes into private static final constants (K4 of #1330) (#1357)
* Hoist visitor matchers and FQNs into `private static final` constants
Matchers, type patterns and FQN strings that were instance fields of
anonymous visitors or locals in `getVisitor()` are now constants on the
recipe class, so they are built once rather than per visitor. Matchers
built from recipe options stay per instance.
* Precompile regex `Pattern`s into static constants
`LombokUtils`, `UpgradeDockerImageVersion`, `UpdateSdkMan`,
`RemoveTemporalAnnotation` and `AddTransientAnnotationToCollections`
compiled constant regexes per call or per visitor. `NoGuavaCreateTempDir`
used `String.matches` to compare fully qualified names, which compiles a
regex on every call; it now uses `equals`.
* Rename camelCase matcher constants to UPPER_SNAKE
`static final` matchers in `URLConstructorsToNewURI`,
`URLConstructorToURICreate`, `OptionalStreamRecipe` and
`NoGuavaCreateTempDir` now follow constant naming; the latter's matcher
moves to the recipe class so the precondition reuses it.
`JREThrowableFinalMethods` builds its matchers from recipe options, so
those stay locals and lose their constant-style names instead.
StringdisplayName = "Attributes with automatically generated values require configuration";
40
43
41
44
Stringdescription = "Adds missing `@TableGenerator` annotation and updates the `@GeneratedValue` annotation values when it uses automatically generated values.";
@@ -45,9 +48,6 @@ public TreeVisitor<?, ExecutionContext> getVisitor() {
0 commit comments