Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable
UnnecessaryAnonymousClass
Error Prone pattern
Is disabled by default as well. It seems what this pattern does is suggest to replace anonymous classes stored in constants with a corresponding method (with the intention that the developer then uses a method reference to that method). But it even does this when the anonymous class implements a custom functional type, and not a generic type such as `Function`. For example it suggested to replace ``` private static final FieldNamingStrategy CUSTOM_FIELD_NAMING_STRATEGY = new FieldNamingStrategy() { @OverRide public String translateName(Field f) { return "foo"; } }; ``` with a method ``` private static String customFieldNamingStrategy(Field f) { return "foo"; } ``` Which is probably not that helpful, and might not actually increase readability.
- Loading branch information