Static method referenced via subclass

Last modified: 03 December 2024

Reports static method calls where the call is qualified by a subclass of the declaring class, rather than by the declaring class itself.

Java allows such qualification for classes, but such calls may indicate a subtle confusion of inheritance and overriding.

Example:

After the quick-fix is applied: