You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is true that the @Nullable of the Checker Framework is not a drop-in replacement for every other @Nullable annotation (that would be impossible, since they differ). You need to:
change your imports and
fix wrong syntax in the few places it occurs.
The Checker Framework uses type annotations, which is the right approach for Java 8+ and which other toolsets (except abandoned ones like jsr305) are also coming to adopt.
The
@Nullable
and@NonNull
annotations does not meet all possible use of it as it is done in jrs305 or even the Jakarta EEComparing to other implementations of
@Nullable
for example, I found that in checker-qual, the annotation is defined asAnd this prevents the use of the annotations at any scope causing issues on migration when moving away from findbugs:jsr305
But looking at jakarta.annotations:jakarta.annotations-api:2.1.1 for example, the annotation is defined without
@Target
(source: https://github.com/jakartaee/common-annotations-api/blob/2.1.1/api/src/main/java/jakarta/annotation/Nullable.java) same as FindBugs oneAlso, JetBrain defines this annotation, but for this particular one they make use of
@Target
but they do declare all possibles locations explicitly (source: https://github.com/JetBrains/java-annotations/blob/master/common/src/main/java/org/jetbrains/annotations/Nullable.java)The text was updated successfully, but these errors were encountered: