I would like to offer some accessors to a value-container (that is a java.lang.Map under the hood). When implementing accessors like this … ‘ofNullable’ is marked with ‘unsafe null type convertion’. Why is this? The parameter ofNullable is not marked as @NonNull. Is it, because empty() or of() is used and of() is checking for NonNull? Is this a Eclipse-bug,
Tag: non-nullable
Writing unit test for @Nonnull annotated parameter
I have a method like this one: I would like to write a unit test to make sure foo() throws an NPE when value is null but I can’t since the compiler refuses to compile the unit test when static null pointer flow analysis is enabled in IDE. How do I make this test compile (in Eclipse with “Enable annotation-based