Reputation: 2646
Is it possible to setup IntelliJ IDEA to treat code like this:
private void myMethod(final String item) {
...
}
as if it were actually
private void myMethod(final @Nullable String item) {
...
}
So that I would be forced to add @NotNull/@NonNull, if I really mean it?
Upvotes: 1
Views: 219
Reputation: 18931
There's a setting in Settings | Inspections | Constant Conditions & Exceptions to treat non-annotated members and parameters as nullable, although it'd apply also to methods and fields.
Upvotes: 1