Inspectopedia
 
2024.3

Call to inherited method looks like call to local method

Warning
New
Last modified: 03 December 2024

Reports calls to a superclass method from an anonymous, inner or local class, if a method with the same signature exists in the code surrounding the class. In this case it may seem that a method from the surrounding code is called, when in fact it is a call to a method from the superclass.

To clarify the intent of the code, it is recommended to add an explicit super qualifier to the method call.

Example:

After the quick-fix is applied: