![]() and then getParameterAnnotations on the returned method binding on each super interface, i call getExactMethod i call declaringClass.superInterfaces() > If you have already tried that, then please let me know. > I2#foo) through a method binding, upon which you would apparently need to ask > X#foo, you will get a method declaration for it, but you will reach I1#foo (or > to get parameter annotations for free from method bindings. > MethodBinding#getParameterAnnotations, I would deduce that you are not expected > I am not the expert here, but from the existence of Since no standard is finished, it would be the more simple solution for now.Īnd also, mixing 2 libraries would mean that methods/locals can be tagged with 2 differents annotations for the same purpose ? I hope this won't happen. So i don't think the "Default null-ness" option worth it anymore.ģ/ Instead of checking for every possible annotations, i suggest a rather simple feature of eclipse : search replace. * using nullable as default would mean that all calls to non-null, but not annotated, methods (like JTable.getSelectedColumns()) would report a warning/an error ("value could be null"), which is also a pain. * using non-null as the default would mean that all calls to HashMap.get() where the value is checked against null would report a warning "useless check for null-ness", which is a pain. This may then all boil down to timing issues.ġ/ The option "Use and can take the value IGNORE/WARNING/ERROR because i thought the user should able to disable annotation checks. We still had some hope that some current JSRs that look at extending the set of 'well known' annotations (aka etc.) would deliver some in the null analysis realm. The trick is that this may well be *needed* to get the feature to deliver any value. We discussed that with Philippe last year and still need to ponder the costs and benefits. ![]() > As users might even mix different libraries, this could even be a list: > with a new compiler option where you tell the compiler what the qualified name > compatible with sources written for IDEA or FindBugs, I suggest to solve this > As there is still no Java standard for the annotation type to use, and to be Even specific eclipse annotations would be really great !! The interoperability is a minor issue i think since search & replace could do the trick. FindBugs: ItelliJ IDEA: and Nully : plugin for the IntelliJ IDEA ![]() JSR 305: Annotations for Software Defect Detection The default could be "don't perfom any check, and assume nothing", and there would be (cannot be null, please check assignments), (can be null, please check every use). The first aim would be to check for null references. It would be great to have new warnings/errors from the compiler based on annotations. Test & fix for problem demonstrated in comment 181 JUnit test for non null annotation featureįix for assumed root cause behind reconciler issueĪlternative strategy for internally encoding nullness defaultsĪ test project to ratify fix in comment 170 Updated NonNull annotation patch to compile against HEAD Preview version of the NonNull annotation patch
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |