Running SonarJava 5.6, i get this:
squid:S4449 “Annotate the parameter with @ javax.annotation.Nullable in method ‘isNotNull’ declaration, or make sure that null can not be passed as argument.”
package is marked with @ org.eclipse.jdt.annotation.NonNullByDefault
Assert.java:
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
public final class Assert {
public static <T> @ NonNull T isNotNull( @ Nullable T obj, String message, Object ... args ){
}
}
Hello
Thank you for your report. I am trying to reproduce the issue but cannot.
Could you please tell me what version of org.eclipse.jdt.annotation you are using?
I tested with version 2.1.100 of org.eclipse.jdt.annotation and could not reproduce your problem (i.e. issues will not be raised for parameters annotated with @org.eclipse.jdt.annotation.Nullable).
thanks for trying this.
I use 2.2.0 of this bundle from Eclipse 4.8.
There is a difference in the @NonNullByDefault annotation.
Might this make a difference?