Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

findbugs @DefaultAnnotation(NonNull.class)

$
0
0

Hi,

 

The findbugs NonNull works fine in IntelliJ.

 

However, it seems that it does not know the DefaultAnnotation.

 

That is, in the code below, a call to myMethod1 with a null arguments is reported as an error (as expected).

but that's not the case for myMethod2.

 

Is there a way to instruct IntelliJ to take the DefaultAnnotation annotation into account?

 

+++++++++++++++

import edu.umd.cs.findbugs.annotations.DefaultAnnotation;

import edu.umd.cs.findbugs.annotations.NonNull;

 

@DefaultAnnotation(NonNull.class)

public class MyClass {

    static public void myMethod1(@NonNull Object value) {

       ...

    }

    static public void myMethod2(Object value) {

       ...

    }

}

+++++++++++++++

 

Regards,

David

 


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>