Empty method
Reports empty methods that can be removed.
Methods are considered empty if they are empty themselves and if they are overridden or implemented by empty methods only. Note that methods containing only comments and the super()
call with own parameters are also considered empty.
The inspection ignores methods with special annotations, for example, the javax.ejb.Init
and javax.ejb.Remove
EJB annotations .
The quick-fix safely removes unnecessary methods.
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
EmptyMethod
Configure the inspection:
Use the Comments and javadoc count as content option to select whether methods with comments should be treated as non-empty.
Use the Additional special annotations option to configure additional annotations that should be ignored by this inspection.
Here you can find the description of settings available for the Empty method inspection, and the reference of their default values.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!