mebigfatguy / fb-contrib

a FindBugs/SpotBugs plugin for doing static code analysis for java code bases
http://fb-contrib.sf.net
GNU Lesser General Public License v2.1
157 stars 45 forks source link

False-positive in OPM_OVERLY_PERMISSIVE_METHOD for equals #468

Open Vampire opened 8 months ago

Vampire commented 8 months ago

OPM_OVERLY_PERMISSIVE_METHOD in SpotBugs 3.1.12 just told me I should make equals protected, which of course would be invalid. The class is package-private which triggers the bug I think.


Originally reported at spotbugs/spotbugs#1055

tautologicc commented 6 months ago

The same false-positive happens with record accessors in Java 21: the plugin asks me to reduce their visibility, even though component accessors are required to be public.