Can IntelliJ inspections assume that every parameter or instance variable is @Nonnull
without actually adding it?
I know in IntelliJ (Java | Probable bugs | Nullability and data flow problems) there is an option that says Treat non-annotated members and parameters as @Nullable
.
What I am looking for is the inverse. I want every member to be @Nonnull
and I will add then @Nullable
to those ones that are nullable.
I have IntellJ setup with these 2 inspections:
And configured to use the jakarta
annotations.
I would like the following to happen
Is this even possible in Intellij wihtout using checkerframework, error prone of a 3rd party libary? (I am also not using spring but quarkus)
2