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
154 stars 45 forks source link

False positive ENMI_ONE_ENUM_VALUE #474

Closed vsTianhao closed 6 days ago

vsTianhao commented 1 week ago

Very failed detection, it doesn’t even recognize basic method rewriting

// A ENMI_ONE_ENUM_VALUE 
enum A {
    aa(1) {
        @Override
        void impl() {
        }
    },
    bb(1) {
        @Override
        void impl() {
        }
    };
    A(int p) {}
    abstract void impl();
}

This kind of code is by no means uncommon, please refer to CaseFormat, LongMath

vsTianhao commented 1 week ago

Sorry, it turned out to be fixed a long time ago, it was this plugin that wasn't updated https://plugins.jetbrains.com/plugin/14014-spotbugs