Recognize Checker Framework declaration annotations.
We are migrating Guava to use these annotations rather than jsr305's @Nullable. We can't use the Checker Framework's _@Nullable_ yet because we promise compatibility with Java 7, which doesn't support type annotations. This is related to but distinct from https://youtrack.jetbrains.com/issue/KT-21408, which is about a different jsr305 annotation we use, @ParametersAreNonnullByDefault. I've also updated some docs to mention Kotlin's existing support for the Checker Framework _@NonNull_.
This commit is contained in:
committed by
Alexander Udalov
parent
79359b7bc2
commit
ac87ad422d
@@ -24,6 +24,7 @@ val NULLABLE_ANNOTATIONS = listOf(
|
||||
FqName("com.android.annotations.Nullable"),
|
||||
FqName("org.eclipse.jdt.annotation.Nullable"),
|
||||
FqName("org.checkerframework.checker.nullness.qual.Nullable"),
|
||||
FqName("org.checkerframework.checker.nullness.compatqual.NullableDecl"),
|
||||
FqName("javax.annotation.Nullable"),
|
||||
FqName("javax.annotation.CheckForNull"),
|
||||
FqName("edu.umd.cs.findbugs.annotations.CheckForNull"),
|
||||
@@ -42,6 +43,7 @@ val NOT_NULL_ANNOTATIONS = listOf(
|
||||
FqName("com.android.annotations.NonNull"),
|
||||
FqName("org.eclipse.jdt.annotation.NonNull"),
|
||||
FqName("org.checkerframework.checker.nullness.qual.NonNull"),
|
||||
FqName("org.checkerframework.checker.nullness.compatqual.NonNullDecl"),
|
||||
FqName("lombok.NonNull"),
|
||||
FqName("io.reactivex.annotations.NonNull")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user