Inspectopedia
 
2024.3

Suspicious getter/setter

Warning
New
Last modified: 03 December 2024

Reports getter or setter methods that access a field that is not expected by its name. For example, when getY() returns the x field. Usually, it might be a copy-paste error.

Example:

Use the checkbox below to report situations when a field in the class has a name that matches a name of a getter or a setter.