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:
- Is it hardcoded or configurable (in some plugin, file,...) which frameworks/methods Eclipse respects for proper Null-Checking?
- Can I write my own methods to let Eclipse know, some variable is guaranteed to be non-null?