Compatibility of @NotNull with Eclipse
IDEA has offered checks for Null/Not Null since annotations were available as language feature. After a decade this feature is also available in Eclipse, but of course it was implemented in a way that is incompatible with IntelliJ.
Unfortunately, the reality in real-life projects is that there are a lot of Eclipse users on the team and now that this kind of check is available natively in Eclipse, they want to use them in projects. The differences that I have found so far are small. It would be really nice if IDEA 13 could inlcude checks that are fully compatible with Eclipse.
I have already filed a couple of issues (IDEA-114883, IDEA-114884, IDEA-114889, IDEA-114891, IDEA-114892) and it would be great if others could add more incompatiblities when they spot them. Hey, I even downloaded and installed Eclipse to find out about these problems.
It would also be nice if IDEA-65566 could be implemented for IDEA 13. However, I'm not a big fan of the this one. I believe that the definition of org.eclipse.jdt.annotation.NonNullByDefault of Eclipse is not fully compatible with javax.annotation.ParametersAreNonnullByDefault and also not fully compatible with the annotation that is used in Google Guava. It's a shame that JSR305 wasn't completed.
Also, it might be worth adding the possibility to have more than one @NotNull/@Nullable annotation. This could be the useful when one uses libraries that use the Eclipse style annotations and others that use jsr305 annotations. What do you guys think?
Please sign in to leave a comment.
At least in IJ 13 you can add as many @NotNull/@Nullable annotations as you want in inspection settings for "@NotNull/@Nullable problems".