Community
Participate
Working Groups
Created attachment 208221 [details] my project settings After configuring a project to use NPE annotations, the *default* "org.eclipse.jdt.annotation.*" types are always proposed, even if the project already uses other annotation types like those from JSR-305 (javax.annotation.NonNull etc). This leads to the bug 366326 (Buildpath problem: the type org.eclipse.jdt.annotation.NonNull cannot be resolved) This should be avoided - a quick query if some well known types are on the project classpath could be done before proposing jdt annotation types. In case there are known annotations available, those should be used in the preference page as default.
This Bug is still active. Using java8 features like using a stream and converting that into a string array: (new ArrayList<>()).stream().toArray(String[]::new); The workaround I use is to disable the "annotation-based null analysis" in project->properties->java-compiler...
(In reply to pascal christoph from comment #1) > This Bug is still active. Using java8 features like using a stream and > converting that into a string array: > > (new ArrayList<>()).stream().toArray(String[]::new); > > The workaround I use is to disable the "annotation-based null analysis" in > project->properties->java-compiler... How does this relate to the selection of annotation types (JDT vs. FindBugs etc.)? Perhaps you intended to drop this comment in another bug? :) Also, I'm not even sure what bug you are seeing regarding your example.
I think this needs to be implemented in JDT/UI as part of the preference dialog.
@stephan I copied the report to bug 366014.
(In reply to pascal christoph from comment #4) > @stephan I copied the report to bug 366014. And after seeing the error message I filed bug 479389 :)
.