Reputation: 253
I use @NonNull-Checking with Eclipse-JDT and was very pleased to see that it understands and respects the use of Apache Commons Validate. Which means in code:
Validate.notNull(someInput);
@NonNull String a = someInput;
Without the first line the second one produces a warning in Eclipse. I can only configure if "assert" should be respected. But without any further notice it also respects Validate#notNull and Objects#requireNonNull. This is great but I wonder:
Upvotes: 2
Views: 111
Reputation: 111162
The list is hard coded and can't be extended (other than by modifying the source code).
Some of the main classes involved as in org.eclipse.jdt.internal.compiler.lookup
and org.eclipse.jdt.internal.compiler.ast
including the TypeConstants
and TypeIds
interfaces and the ReferenceBinding
and MessageSend
classes.
Upvotes: 3