Inspectopedia
 
2024.3

Inner class referenced via subclass

Warning
New
Last modified: 03 December 2024

Reports accesses of inner and nested classes where the call is qualified by a subclass of the declaring class, rather than the declaring class itself.

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

Example:

After the quick-fix is applied: