Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Sometimes we have API usage rules which require manual actions to correct.
For instance, we "forbid" the use of Lists#newArrayList(), and suggest replacing it with new ArrayList().
It would be better if the build script could perform such replacements automatically.
Refaster is a smart refactoring library for Java: https://errorprone.info/docs/refaster, and it could help us to keep the code up to date.
Of course, forbidden-apis checks might still be there (e.g. for those who prefer manual replacements), however, adding automatic code cleanups would be great.