|
19 | 19 | import static java.lang.annotation.ElementType.FIELD;
|
20 | 20 | import static java.lang.annotation.ElementType.METHOD;
|
21 | 21 | import static java.lang.annotation.ElementType.PARAMETER;
|
22 |
| -import static java.lang.annotation.RetentionPolicy.RUNTIME; |
| 22 | +import static java.lang.annotation.RetentionPolicy.CLASS; |
23 | 23 |
|
24 | 24 | import com.google.common.annotations.GwtCompatible;
|
25 | 25 | import java.lang.annotation.Retention;
|
|
54 | 54 | * <p>Consumers of this annotation include:
|
55 | 55 | *
|
56 | 56 | * <ul>
|
57 |
| - * <li>Kotlin, for which it makes the type-variable usage (a) a Kotlin platform type when the type |
58 |
| - * argument is non-nullable and (b) nullable when the type argument is nullable. We use this |
59 |
| - * to reduce the immediate effects of {@code NullMarked} as we transition to JSpecify |
60 |
| - * annotations. |
61 |
| - * <li>NullAway, which will <a |
62 |
| - * href="https://github.com/google/guava/issues/6126#issuecomment-1204399671">treat it |
63 |
| - * identically to {@code Nullable} as of version 0.9.9</a>. To treat it that way before then, |
64 |
| - * you can set {@code |
65 |
| - * -XepOpt:NullAway:CustomNullableAnnotations=com.google.common.base.ParametricNullness,...,com.google.common.util.concurrent.ParametricNullness}, |
66 |
| - * where the {@code ...} contains the names of all the other {@code ParametricNullness} |
67 |
| - * annotations in Guava. Or you might prefer to omit Guava from your {@code AnnotatedPackages} |
68 |
| - * list. |
69 |
| - * <li><a href="https://developers.google.com/j2objc">J2ObjC</a> |
70 |
| - * <li>{@code NullPointerTester}, at least in the Android backport (where the type-use annotations |
71 |
| - * {@code NullPointerTester} would need are not available) and in case of <a |
72 |
| - * href="https://bugs.openjdk.java.net/browse/JDK-8202469">JDK-8202469</a> |
| 57 | + * <li>NullAway, which <a |
| 58 | + * href="https://github.com/google/guava/issues/6126#issuecomment-1204399671">treats it |
| 59 | + * identically to {@code Nullable}</a> as of version 0.9.9. |
| 60 | + * <li><a href="https://developers.google.com/j2objc">J2ObjC</a>, maybe: It might no longer be |
| 61 | + * necessary there, since we have stopped using the {@code @ParametersAreNonnullByDefault} |
| 62 | + * annotations that {@code ParametricNullness} was counteracting. |
73 | 63 | * </ul>
|
74 | 64 | *
|
75 |
| - * <p>This annotation is a temporary hack. We will remove it after we're able to adopt the <a |
76 |
| - * href="https://jspecify.dev/">JSpecify</a> nullness annotations and <a |
| 65 | + * <p>This annotation is a temporary hack. We will remove it after <a |
77 | 66 | * href="https://github.com/google/guava/issues/6126#issuecomment-1203145963">tools no longer need
|
78 | 67 | * it</a>.
|
79 | 68 | */
|
80 | 69 | @GwtCompatible
|
81 |
| -@Retention(RUNTIME) |
| 70 | +@Retention(CLASS) |
82 | 71 | @Target({FIELD, METHOD, PARAMETER})
|
83 |
| -@javax.annotation.meta.TypeQualifierNickname |
84 |
| -@javax.annotation.Nonnull(when = javax.annotation.meta.When.UNKNOWN) |
85 | 72 | @interface ParametricNullness {}
|
0 commit comments