|Re: Why does Eclipse think something cannot be null? [message #1765637 is a reply to message #1765627]
||Mon, 12 June 2017 23:39
| David M. Karr
Registered: July 2009
Ok, reading the instructions at the "help.eclipse.org" page, I created a directory tree on my disk to hold this information, and I created an empty hierarchy down to a directory for "rt", which is where the "Method" class is.|
I then edited the JRE entry, adding the external annotation path ("External location") to the "rt.jar" file.
I note that in the "Creating external annotations" section, it starts with the following text:
Pre-requisites: External annotations require a library with source attachment. Additionally, annotation based null analysis must be enabled for the current project, an external annotation location must be defined for the library and that location must be a directory (not a zip file) within the workspace.
I'm not sure how to interpret several details in this. This seems to imply that I can't use "External location".
In any case, I then navigated to the "java.lang.reflect.Method" class, and the "getAnnotation(Class<T> arg0)" method. It says I can select the "method return type", which is "T" in this case.
I then right-clicked and selected "Annotate", and Eclipse just dinged at me. No error message, no log entry.
Powered by FUDForum
. Page generated in 0.01495 seconds