Inspectopedia
 
2024.3

'final' method in 'final' class

Warning
New
Last modified: 03 December 2024

Reports final methods in final classes.

Since final classes cannot be inherited, marking a method as final may be unnecessary and confusing.

Example:

After the quick-fix is applied:

As shown in the example, a class can be marked as final explicitly or implicitly.