Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.26.0
-
None
Description
See https://errorprone.info/bugpattern/MethodCanBeStatic
A private method that does not reference the enclosing instance can be static
Note: the key driver is code readability. If a method is static, it is clear that it can't access instance fields, and all it can access is provided via arguments.
Attachments
Issue Links
- links to