Skip to content

Commit 869a75a

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Replace nonsense with a wall of text.
RELNOTES=n/a PiperOrigin-RevId: 794719933
1 parent 2912891 commit 869a75a

File tree

6 files changed

+30
-18
lines changed

6 files changed

+30
-18
lines changed

android/guava/src/com/google/common/base/NullnessCasts.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ final class NullnessCasts {
4444
* doesn't work: Because nullness analyses typically infer the nullness of local variables,
4545
* there's no way to assign a {@code @Nullable T} to a field {@code T foo;} and instruct the
4646
* analysis that that means "plain {@code T}" rather than the inferred type {@code @Nullable T}.
47-
* (Even if supported added {@code @NonNull}, that would not help, since the problem case
48-
* addressed by this method is the case in which {@code T} has parametric nullness -- and thus its
49-
* value may be legitimately {@code null}.)
47+
* (And even if annotations on local variables were permitted as an optional hint, no annotation
48+
* would be the right tool for the job here: {@code @Nullable} is the annotation that we're trying
49+
* to get rid of, and {@code @NonNull} would be wrong for our use case for the same reason as
50+
* {@code requireNonNull}: Our use case is the one in which {@code T} has parametric nullness—and
51+
* thus its value may be legitimately {@code null}.)
5052
*/
5153
@ParametricNullness
5254
@SuppressWarnings("nullness")

android/guava/src/com/google/common/collect/NullnessCasts.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ final class NullnessCasts {
4444
* doesn't work: Because nullness analyses typically infer the nullness of local variables,
4545
* there's no way to assign a {@code @Nullable T} to a field {@code T foo;} and instruct the
4646
* analysis that that means "plain {@code T}" rather than the inferred type {@code @Nullable T}.
47-
* (Even if supported added {@code @NonNull}, that would not help, since the problem case
48-
* addressed by this method is the case in which {@code T} has parametric nullness -- and thus its
49-
* value may be legitimately {@code null}.)
47+
* (And even if annotations on local variables were permitted as an optional hint, no annotation
48+
* would be the right tool for the job here: {@code @Nullable} is the annotation that we're trying
49+
* to get rid of, and {@code @NonNull} would be wrong for our use case for the same reason as
50+
* {@code requireNonNull}: Our use case is the one in which {@code T} has parametric nullness—and
51+
* thus its value may be legitimately {@code null}.)
5052
*/
5153
@ParametricNullness
5254
@SuppressWarnings("nullness")

android/guava/src/com/google/common/util/concurrent/NullnessCasts.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ final class NullnessCasts {
4444
* doesn't work: Because nullness analyses typically infer the nullness of local variables,
4545
* there's no way to assign a {@code @Nullable T} to a field {@code T foo;} and instruct the
4646
* analysis that that means "plain {@code T}" rather than the inferred type {@code @Nullable T}.
47-
* (Even if supported added {@code @NonNull}, that would not help, since the problem case
48-
* addressed by this method is the case in which {@code T} has parametric nullness -- and thus its
49-
* value may be legitimately {@code null}.)
47+
* (And even if annotations on local variables were permitted as an optional hint, no annotation
48+
* would be the right tool for the job here: {@code @Nullable} is the annotation that we're trying
49+
* to get rid of, and {@code @NonNull} would be wrong for our use case for the same reason as
50+
* {@code requireNonNull}: Our use case is the one in which {@code T} has parametric nullness—and
51+
* thus its value may be legitimately {@code null}.)
5052
*/
5153
@SuppressWarnings("nullness")
5254
@ParametricNullness

guava/src/com/google/common/base/NullnessCasts.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ final class NullnessCasts {
4444
* doesn't work: Because nullness analyses typically infer the nullness of local variables,
4545
* there's no way to assign a {@code @Nullable T} to a field {@code T foo;} and instruct the
4646
* analysis that that means "plain {@code T}" rather than the inferred type {@code @Nullable T}.
47-
* (Even if supported added {@code @NonNull}, that would not help, since the problem case
48-
* addressed by this method is the case in which {@code T} has parametric nullness -- and thus its
49-
* value may be legitimately {@code null}.)
47+
* (And even if annotations on local variables were permitted as an optional hint, no annotation
48+
* would be the right tool for the job here: {@code @Nullable} is the annotation that we're trying
49+
* to get rid of, and {@code @NonNull} would be wrong for our use case for the same reason as
50+
* {@code requireNonNull}: Our use case is the one in which {@code T} has parametric nullness—and
51+
* thus its value may be legitimately {@code null}.)
5052
*/
5153
@ParametricNullness
5254
@SuppressWarnings("nullness")

guava/src/com/google/common/collect/NullnessCasts.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ final class NullnessCasts {
4444
* doesn't work: Because nullness analyses typically infer the nullness of local variables,
4545
* there's no way to assign a {@code @Nullable T} to a field {@code T foo;} and instruct the
4646
* analysis that that means "plain {@code T}" rather than the inferred type {@code @Nullable T}.
47-
* (Even if supported added {@code @NonNull}, that would not help, since the problem case
48-
* addressed by this method is the case in which {@code T} has parametric nullness -- and thus its
49-
* value may be legitimately {@code null}.)
47+
* (And even if annotations on local variables were permitted as an optional hint, no annotation
48+
* would be the right tool for the job here: {@code @Nullable} is the annotation that we're trying
49+
* to get rid of, and {@code @NonNull} would be wrong for our use case for the same reason as
50+
* {@code requireNonNull}: Our use case is the one in which {@code T} has parametric nullness—and
51+
* thus its value may be legitimately {@code null}.)
5052
*/
5153
@ParametricNullness
5254
@SuppressWarnings("nullness")

guava/src/com/google/common/util/concurrent/NullnessCasts.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ final class NullnessCasts {
4444
* doesn't work: Because nullness analyses typically infer the nullness of local variables,
4545
* there's no way to assign a {@code @Nullable T} to a field {@code T foo;} and instruct the
4646
* analysis that that means "plain {@code T}" rather than the inferred type {@code @Nullable T}.
47-
* (Even if supported added {@code @NonNull}, that would not help, since the problem case
48-
* addressed by this method is the case in which {@code T} has parametric nullness -- and thus its
49-
* value may be legitimately {@code null}.)
47+
* (And even if annotations on local variables were permitted as an optional hint, no annotation
48+
* would be the right tool for the job here: {@code @Nullable} is the annotation that we're trying
49+
* to get rid of, and {@code @NonNull} would be wrong for our use case for the same reason as
50+
* {@code requireNonNull}: Our use case is the one in which {@code T} has parametric nullness—and
51+
* thus its value may be legitimately {@code null}.)
5052
*/
5153
@SuppressWarnings("nullness")
5254
@ParametricNullness

0 commit comments

Comments
 (0)