diff --git a/android/guava-testlib/src/com/google/common/collect/testing/ElementTypesAreNonnullByDefault.java b/android/guava-testlib/src/com/google/common/collect/testing/ElementTypesAreNonnullByDefault.java index 80379ccb8c69..8db97d3f9f49 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/ElementTypesAreNonnullByDefault.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava-testlib/src/com/google/common/collect/testing/google/ElementTypesAreNonnullByDefault.java b/android/guava-testlib/src/com/google/common/collect/testing/google/ElementTypesAreNonnullByDefault.java index c666efdcbff8..87df7be95abe 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/google/ElementTypesAreNonnullByDefault.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/google/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava-testlib/src/com/google/common/collect/testing/testers/ElementTypesAreNonnullByDefault.java b/android/guava-testlib/src/com/google/common/collect/testing/testers/ElementTypesAreNonnullByDefault.java index 6d5d26c79493..c6a554f44d29 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/testers/ElementTypesAreNonnullByDefault.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/testers/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java b/android/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java index 1362176b5a12..7665c62b969e 100644 --- a/android/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java +++ b/android/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava-testlib/src/com/google/common/testing/package-info.java b/android/guava-testlib/src/com/google/common/testing/package-info.java index 3c0849ffca63..415d51a17b63 100644 --- a/android/guava-testlib/src/com/google/common/testing/package-info.java +++ b/android/guava-testlib/src/com/google/common/testing/package-info.java @@ -19,5 +19,4 @@ * href="https://github.com/google/guava">Guava library. */ @com.google.errorprone.annotations.CheckReturnValue -@javax.annotation.ParametersAreNonnullByDefault package com.google.common.testing; diff --git a/android/guava/src/com/google/common/base/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/base/ElementTypesAreNonnullByDefault.java index 890e3a36062a..a0adb0236c89 100644 --- a/android/guava/src/com/google/common/base/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/base/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/base/package-info.java b/android/guava/src/com/google/common/base/package-info.java index bfae42674506..8cdbdca4c236 100644 --- a/android/guava/src/com/google/common/base/package-info.java +++ b/android/guava/src/com/google/common/base/package-info.java @@ -57,8 +57,7 @@ * Defaults}), as well as a number of classes that have been superseded by additions to the JDK. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.base; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/cache/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/cache/ElementTypesAreNonnullByDefault.java index bcf0fcef1c48..51431fe419ea 100644 --- a/android/guava/src/com/google/common/cache/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/cache/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/cache/package-info.java b/android/guava/src/com/google/common/cache/package-info.java index fc678d44a71c..e494d931f42b 100644 --- a/android/guava/src/com/google/common/cache/package-info.java +++ b/android/guava/src/com/google/common/cache/package-info.java @@ -29,8 +29,7 @@ * @author Charles Fry */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.cache; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/collect/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/collect/ElementTypesAreNonnullByDefault.java index e1c640ff5db4..8fe0fb375643 100644 --- a/android/guava/src/com/google/common/collect/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/collect/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/collect/package-info.java b/android/guava/src/com/google/common/collect/package-info.java index ad169a6852c8..048b7d8d72f1 100644 --- a/android/guava/src/com/google/common/collect/package-info.java +++ b/android/guava/src/com/google/common/collect/package-info.java @@ -120,8 +120,7 @@ * */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.collect; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/escape/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/escape/ElementTypesAreNonnullByDefault.java index 992c9a3e4d84..93130cb88176 100644 --- a/android/guava/src/com/google/common/escape/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/escape/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/escape/package-info.java b/android/guava/src/com/google/common/escape/package-info.java index 4c525386e6f6..80c42464e1bb 100644 --- a/android/guava/src/com/google/common/escape/package-info.java +++ b/android/guava/src/com/google/common/escape/package-info.java @@ -25,8 +25,7 @@ * library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.escape; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/eventbus/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/eventbus/ElementTypesAreNonnullByDefault.java index e8542bba63ec..8ef823148266 100644 --- a/android/guava/src/com/google/common/eventbus/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/eventbus/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/eventbus/package-info.java b/android/guava/src/com/google/common/eventbus/package-info.java index bd675415c15b..3808bde9a221 100644 --- a/android/guava/src/com/google/common/eventbus/package-info.java +++ b/android/guava/src/com/google/common/eventbus/package-info.java @@ -20,8 +20,7 @@ * href="https://github.com/google/guava/wiki/EventBusExplained">{@code EventBus}. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.eventbus; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/graph/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/graph/ElementTypesAreNonnullByDefault.java index 0798de0c9883..0821642f52d4 100644 --- a/android/guava/src/com/google/common/graph/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/graph/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/graph/package-info.java b/android/guava/src/com/google/common/graph/package-info.java index 32d8b0157bb3..bed41eefec3a 100644 --- a/android/guava/src/com/google/common/graph/package-info.java +++ b/android/guava/src/com/google/common/graph/package-info.java @@ -22,8 +22,7 @@ * library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.graph; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/hash/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/hash/ElementTypesAreNonnullByDefault.java index a2382b3514cc..ab3aa88d9d7a 100644 --- a/android/guava/src/com/google/common/hash/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/hash/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/hash/package-info.java b/android/guava/src/com/google/common/hash/package-info.java index d210f7ef7b46..9dbbbaac3438 100644 --- a/android/guava/src/com/google/common/hash/package-info.java +++ b/android/guava/src/com/google/common/hash/package-info.java @@ -20,8 +20,7 @@ * href="https://github.com/google/guava/wiki/HashingExplained">hashing. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.hash; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/html/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/html/ElementTypesAreNonnullByDefault.java index a28b716632d4..5e471bdbbce9 100644 --- a/android/guava/src/com/google/common/html/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/html/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/html/package-info.java b/android/guava/src/com/google/common/html/package-info.java index 1a97bccd1ab1..03f51fdb04c3 100644 --- a/android/guava/src/com/google/common/html/package-info.java +++ b/android/guava/src/com/google/common/html/package-info.java @@ -21,8 +21,7 @@ * library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.html; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/io/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/io/ElementTypesAreNonnullByDefault.java index 48bc10f192a1..321b5826baa6 100644 --- a/android/guava/src/com/google/common/io/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/io/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/io/package-info.java b/android/guava/src/com/google/common/io/package-info.java index e4eebbd0d798..c29b61a74d97 100644 --- a/android/guava/src/com/google/common/io/package-info.java +++ b/android/guava/src/com/google/common/io/package-info.java @@ -28,8 +28,7 @@ * @author Chris Nokleberg */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.io; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/math/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/math/ElementTypesAreNonnullByDefault.java index 84999ea49499..d314278a8076 100644 --- a/android/guava/src/com/google/common/math/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/math/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/math/package-info.java b/android/guava/src/com/google/common/math/package-info.java index 02580e1a4220..da2392a6a5a5 100644 --- a/android/guava/src/com/google/common/math/package-info.java +++ b/android/guava/src/com/google/common/math/package-info.java @@ -22,9 +22,8 @@ *

See the Guava User Guide article on math utilities. */ -@ParametersAreNonnullByDefault @CheckReturnValue +@ElementTypesAreNonnullByDefault package com.google.common.math; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/net/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/net/ElementTypesAreNonnullByDefault.java index d8cfd7377d0e..3c8b9f4225f8 100644 --- a/android/guava/src/com/google/common/net/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/net/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/net/package-info.java b/android/guava/src/com/google/common/net/package-info.java index 6a74ecee4918..1fa33a1ad434 100644 --- a/android/guava/src/com/google/common/net/package-info.java +++ b/android/guava/src/com/google/common/net/package-info.java @@ -21,8 +21,7 @@ * @author Craig Berry */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.net; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/primitives/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/primitives/ElementTypesAreNonnullByDefault.java index 44f6869c7cda..1240d1075a28 100644 --- a/android/guava/src/com/google/common/primitives/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/primitives/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/primitives/package-info.java b/android/guava/src/com/google/common/primitives/package-info.java index ad38c111393c..2fdf789228e7 100644 --- a/android/guava/src/com/google/common/primitives/package-info.java +++ b/android/guava/src/com/google/common/primitives/package-info.java @@ -63,9 +63,8 @@ *

  • {@link Primitives} * */ -@ParametersAreNonnullByDefault @CheckReturnValue +@ElementTypesAreNonnullByDefault package com.google.common.primitives; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/reflect/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/reflect/ElementTypesAreNonnullByDefault.java index 0e8ef3cb7bcb..594c4c394bf6 100644 --- a/android/guava/src/com/google/common/reflect/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/reflect/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/reflect/package-info.java b/android/guava/src/com/google/common/reflect/package-info.java index 1fc793e2ad86..71583d47498e 100644 --- a/android/guava/src/com/google/common/reflect/package-info.java +++ b/android/guava/src/com/google/common/reflect/package-info.java @@ -17,8 +17,7 @@ * href="https://github.com/google/guava">Guava library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.reflect; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/util/concurrent/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/util/concurrent/ElementTypesAreNonnullByDefault.java index 34871255e812..4dc5c72362d4 100644 --- a/android/guava/src/com/google/common/util/concurrent/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/util/concurrent/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/util/concurrent/package-info.java b/android/guava/src/com/google/common/util/concurrent/package-info.java index 7df382a54e82..41af41c0d3ab 100644 --- a/android/guava/src/com/google/common/util/concurrent/package-info.java +++ b/android/guava/src/com/google/common/util/concurrent/package-info.java @@ -25,8 +25,7 @@ * library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.util.concurrent; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/android/guava/src/com/google/common/xml/ElementTypesAreNonnullByDefault.java b/android/guava/src/com/google/common/xml/ElementTypesAreNonnullByDefault.java index b4fb4e3fe470..4a6bee38582a 100644 --- a/android/guava/src/com/google/common/xml/ElementTypesAreNonnullByDefault.java +++ b/android/guava/src/com/google/common/xml/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava/src/com/google/common/xml/package-info.java b/android/guava/src/com/google/common/xml/package-info.java index 8693276272ef..c06e1b5702f9 100644 --- a/android/guava/src/com/google/common/xml/package-info.java +++ b/android/guava/src/com/google/common/xml/package-info.java @@ -21,8 +21,7 @@ * library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.xml; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java b/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java index 9bdbe5d4f9cd..36b21b53c87c 100644 --- a/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java +++ b/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java @@ -40,6 +40,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ExecutionException; +import org.jspecify.annotations.NullUnmarked; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -50,6 +51,8 @@ * @author Charles Fry * @author Jon Donovan */ +@NullUnmarked +@SuppressWarnings("nullness") // TODO: b/384945891 - Remove after fixing checker. public class LocalCache implements ConcurrentMap { private static final int UNSET_INT = CacheBuilder.UNSET_INT; diff --git a/guava-testlib/src/com/google/common/collect/testing/ElementTypesAreNonnullByDefault.java b/guava-testlib/src/com/google/common/collect/testing/ElementTypesAreNonnullByDefault.java index 80379ccb8c69..8db97d3f9f49 100644 --- a/guava-testlib/src/com/google/common/collect/testing/ElementTypesAreNonnullByDefault.java +++ b/guava-testlib/src/com/google/common/collect/testing/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava-testlib/src/com/google/common/collect/testing/google/ElementTypesAreNonnullByDefault.java b/guava-testlib/src/com/google/common/collect/testing/google/ElementTypesAreNonnullByDefault.java index c666efdcbff8..87df7be95abe 100644 --- a/guava-testlib/src/com/google/common/collect/testing/google/ElementTypesAreNonnullByDefault.java +++ b/guava-testlib/src/com/google/common/collect/testing/google/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava-testlib/src/com/google/common/collect/testing/testers/ElementTypesAreNonnullByDefault.java b/guava-testlib/src/com/google/common/collect/testing/testers/ElementTypesAreNonnullByDefault.java index 6d5d26c79493..c6a554f44d29 100644 --- a/guava-testlib/src/com/google/common/collect/testing/testers/ElementTypesAreNonnullByDefault.java +++ b/guava-testlib/src/com/google/common/collect/testing/testers/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java b/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java index 1362176b5a12..7665c62b969e 100644 --- a/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java +++ b/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava-testlib/src/com/google/common/testing/package-info.java b/guava-testlib/src/com/google/common/testing/package-info.java index 3c0849ffca63..415d51a17b63 100644 --- a/guava-testlib/src/com/google/common/testing/package-info.java +++ b/guava-testlib/src/com/google/common/testing/package-info.java @@ -19,5 +19,4 @@ * href="https://github.com/google/guava">Guava library. */ @com.google.errorprone.annotations.CheckReturnValue -@javax.annotation.ParametersAreNonnullByDefault package com.google.common.testing; diff --git a/guava/src/com/google/common/base/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/base/ElementTypesAreNonnullByDefault.java index 890e3a36062a..a0adb0236c89 100644 --- a/guava/src/com/google/common/base/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/base/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/base/package-info.java b/guava/src/com/google/common/base/package-info.java index bfae42674506..8cdbdca4c236 100644 --- a/guava/src/com/google/common/base/package-info.java +++ b/guava/src/com/google/common/base/package-info.java @@ -57,8 +57,7 @@ * Defaults}), as well as a number of classes that have been superseded by additions to the JDK. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.base; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/cache/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/cache/ElementTypesAreNonnullByDefault.java index bcf0fcef1c48..51431fe419ea 100644 --- a/guava/src/com/google/common/cache/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/cache/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/cache/package-info.java b/guava/src/com/google/common/cache/package-info.java index fc678d44a71c..e494d931f42b 100644 --- a/guava/src/com/google/common/cache/package-info.java +++ b/guava/src/com/google/common/cache/package-info.java @@ -29,8 +29,7 @@ * @author Charles Fry */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.cache; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/collect/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/collect/ElementTypesAreNonnullByDefault.java index e1c640ff5db4..8fe0fb375643 100644 --- a/guava/src/com/google/common/collect/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/collect/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/collect/package-info.java b/guava/src/com/google/common/collect/package-info.java index ad169a6852c8..048b7d8d72f1 100644 --- a/guava/src/com/google/common/collect/package-info.java +++ b/guava/src/com/google/common/collect/package-info.java @@ -120,8 +120,7 @@ * */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.collect; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/escape/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/escape/ElementTypesAreNonnullByDefault.java index 992c9a3e4d84..93130cb88176 100644 --- a/guava/src/com/google/common/escape/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/escape/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/escape/package-info.java b/guava/src/com/google/common/escape/package-info.java index 4c525386e6f6..80c42464e1bb 100644 --- a/guava/src/com/google/common/escape/package-info.java +++ b/guava/src/com/google/common/escape/package-info.java @@ -25,8 +25,7 @@ * library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.escape; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/eventbus/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/eventbus/ElementTypesAreNonnullByDefault.java index e8542bba63ec..8ef823148266 100644 --- a/guava/src/com/google/common/eventbus/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/eventbus/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/eventbus/package-info.java b/guava/src/com/google/common/eventbus/package-info.java index bd675415c15b..3808bde9a221 100644 --- a/guava/src/com/google/common/eventbus/package-info.java +++ b/guava/src/com/google/common/eventbus/package-info.java @@ -20,8 +20,7 @@ * href="https://github.com/google/guava/wiki/EventBusExplained">{@code EventBus}. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.eventbus; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/graph/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/graph/ElementTypesAreNonnullByDefault.java index 0798de0c9883..0821642f52d4 100644 --- a/guava/src/com/google/common/graph/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/graph/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/graph/package-info.java b/guava/src/com/google/common/graph/package-info.java index 32d8b0157bb3..bed41eefec3a 100644 --- a/guava/src/com/google/common/graph/package-info.java +++ b/guava/src/com/google/common/graph/package-info.java @@ -22,8 +22,7 @@ * library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.graph; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/hash/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/hash/ElementTypesAreNonnullByDefault.java index a2382b3514cc..ab3aa88d9d7a 100644 --- a/guava/src/com/google/common/hash/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/hash/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/hash/package-info.java b/guava/src/com/google/common/hash/package-info.java index d210f7ef7b46..9dbbbaac3438 100644 --- a/guava/src/com/google/common/hash/package-info.java +++ b/guava/src/com/google/common/hash/package-info.java @@ -20,8 +20,7 @@ * href="https://github.com/google/guava/wiki/HashingExplained">hashing. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.hash; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/html/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/html/ElementTypesAreNonnullByDefault.java index a28b716632d4..5e471bdbbce9 100644 --- a/guava/src/com/google/common/html/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/html/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/html/package-info.java b/guava/src/com/google/common/html/package-info.java index 1a97bccd1ab1..03f51fdb04c3 100644 --- a/guava/src/com/google/common/html/package-info.java +++ b/guava/src/com/google/common/html/package-info.java @@ -21,8 +21,7 @@ * library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.html; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/io/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/io/ElementTypesAreNonnullByDefault.java index 48bc10f192a1..321b5826baa6 100644 --- a/guava/src/com/google/common/io/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/io/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/io/package-info.java b/guava/src/com/google/common/io/package-info.java index e4eebbd0d798..c29b61a74d97 100644 --- a/guava/src/com/google/common/io/package-info.java +++ b/guava/src/com/google/common/io/package-info.java @@ -28,8 +28,7 @@ * @author Chris Nokleberg */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.io; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/math/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/math/ElementTypesAreNonnullByDefault.java index 84999ea49499..d314278a8076 100644 --- a/guava/src/com/google/common/math/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/math/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/math/package-info.java b/guava/src/com/google/common/math/package-info.java index 02580e1a4220..da2392a6a5a5 100644 --- a/guava/src/com/google/common/math/package-info.java +++ b/guava/src/com/google/common/math/package-info.java @@ -22,9 +22,8 @@ *

    See the Guava User Guide article on math utilities. */ -@ParametersAreNonnullByDefault @CheckReturnValue +@ElementTypesAreNonnullByDefault package com.google.common.math; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/net/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/net/ElementTypesAreNonnullByDefault.java index d8cfd7377d0e..3c8b9f4225f8 100644 --- a/guava/src/com/google/common/net/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/net/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/net/package-info.java b/guava/src/com/google/common/net/package-info.java index 6a74ecee4918..1fa33a1ad434 100644 --- a/guava/src/com/google/common/net/package-info.java +++ b/guava/src/com/google/common/net/package-info.java @@ -21,8 +21,7 @@ * @author Craig Berry */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.net; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/primitives/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/primitives/ElementTypesAreNonnullByDefault.java index 44f6869c7cda..1240d1075a28 100644 --- a/guava/src/com/google/common/primitives/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/primitives/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/primitives/package-info.java b/guava/src/com/google/common/primitives/package-info.java index ad38c111393c..2fdf789228e7 100644 --- a/guava/src/com/google/common/primitives/package-info.java +++ b/guava/src/com/google/common/primitives/package-info.java @@ -63,9 +63,8 @@ *

  • {@link Primitives} * */ -@ParametersAreNonnullByDefault @CheckReturnValue +@ElementTypesAreNonnullByDefault package com.google.common.primitives; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/reflect/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/reflect/ElementTypesAreNonnullByDefault.java index 0e8ef3cb7bcb..594c4c394bf6 100644 --- a/guava/src/com/google/common/reflect/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/reflect/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/reflect/package-info.java b/guava/src/com/google/common/reflect/package-info.java index 1fc793e2ad86..71583d47498e 100644 --- a/guava/src/com/google/common/reflect/package-info.java +++ b/guava/src/com/google/common/reflect/package-info.java @@ -17,8 +17,7 @@ * href="https://github.com/google/guava">Guava library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.reflect; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/util/concurrent/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/util/concurrent/ElementTypesAreNonnullByDefault.java index 34871255e812..4dc5c72362d4 100644 --- a/guava/src/com/google/common/util/concurrent/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/util/concurrent/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/util/concurrent/package-info.java b/guava/src/com/google/common/util/concurrent/package-info.java index 7df382a54e82..41af41c0d3ab 100644 --- a/guava/src/com/google/common/util/concurrent/package-info.java +++ b/guava/src/com/google/common/util/concurrent/package-info.java @@ -25,8 +25,7 @@ * library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.util.concurrent; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/guava/src/com/google/common/xml/ElementTypesAreNonnullByDefault.java b/guava/src/com/google/common/xml/ElementTypesAreNonnullByDefault.java index b4fb4e3fe470..4a6bee38582a 100644 --- a/guava/src/com/google/common/xml/ElementTypesAreNonnullByDefault.java +++ b/guava/src/com/google/common/xml/ElementTypesAreNonnullByDefault.java @@ -18,6 +18,7 @@ import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -35,7 +36,7 @@ */ @GwtCompatible @Retention(RUNTIME) -@Target(TYPE) +@Target({PACKAGE, TYPE}) @TypeQualifierDefault({FIELD, METHOD, PARAMETER}) @Nonnull @interface ElementTypesAreNonnullByDefault {} diff --git a/guava/src/com/google/common/xml/package-info.java b/guava/src/com/google/common/xml/package-info.java index 8693276272ef..c06e1b5702f9 100644 --- a/guava/src/com/google/common/xml/package-info.java +++ b/guava/src/com/google/common/xml/package-info.java @@ -21,8 +21,7 @@ * library. */ @CheckReturnValue -@ParametersAreNonnullByDefault +@ElementTypesAreNonnullByDefault package com.google.common.xml; import com.google.errorprone.annotations.CheckReturnValue; -import javax.annotation.ParametersAreNonnullByDefault;