Eclipse custom @NonNull annotation ignored -
i use "null analysis" feature of eclipse rather use javax.annotation.nonnull annotation org.eclipse.jdt.annotation.nonnull annotation. can't seem eclipse recognize custom annotations configure.
i'm using eclipse luna 4.4.2.
i created new test project contains following class:
package org.example; import javax.annotation.nonnull; public class omgnulls { public static void main(string[] args) { @nonnull string test = null; system.out.println(test); } }
my compiler settings configured use javax annotations:
my project's includes checker-1.8.10 jar provide annotations.
with these settings, eclipse reports 0 errors.
if check "use default annotations null specifications" , change test class use eclipse's annotation, get:
anyone know i'm doing wrong or eclipse bug maybe? i've tried jsr305 jar google instead of checker in case issue didn't help.
Comments
Post a Comment