Inspectopedia
 
2024.3

'protected' visibility is effectively 'private' in a final class

Info
New
Last modified: 03 December 2024

Reports protected visibility used inside of a final class. In such cases protected members are accessible only in the class itself, so they are effectively private.

Example:

After the quick-fix is applied: