How to enable null annotations on types? [message #1273325] |
Wed, 19 March 2014 22:23 |
Tom van den Bege Messages: 9 Registered: July 2009 |
Junior Member |
|
|
With the release of Eclipse's java 8 support, I understood that null annotations on types were possible, as described here.
I have installed JDK8, and the Java 8 feature patch for Eclipse Kepler.
I was expecting to be able to declare a list that does not allow nulls like this:
List<@NonNull String> nonulls;
However, the compiler tells me that "The annotation @NonNull is disallowed for this location"
My project is configured to use compiler compliance level 1.8, and the org.eclipse.jdt.annotation jar is included in the class path.
What am I missing here?
Regards,
Tom
[Updated on: Thu, 20 March 2014 10:56] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 1.05208 seconds