From d9dbb1594e6d412973e99119bd01ecdca1690baa Mon Sep 17 00:00:00 2001 From: Google Java Core Libraries Date: Tue, 24 Sep 2024 06:37:18 -0700 Subject: [PATCH] Fix one instance of incorrect nullability of type argument in FluentIterable. RELNOTES=n/a PiperOrigin-RevId: 678224792 --- .../guava/src/com/google/common/collect/FluentIterable.java | 4 ++-- guava/src/com/google/common/collect/FluentIterable.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/guava/src/com/google/common/collect/FluentIterable.java b/android/guava/src/com/google/common/collect/FluentIterable.java index 0abfb481c11a..4cc0d043c106 100644 --- a/android/guava/src/com/google/common/collect/FluentIterable.java +++ b/android/guava/src/com/google/common/collect/FluentIterable.java @@ -465,9 +465,9 @@ public final boolean allMatch(Predicate predicate) { * *

{@code Stream} equivalent: {@code stream.filter(predicate).findFirst()}. */ - @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. public final Optional<@NonNull E> firstMatch(Predicate predicate) { - return Iterables.tryFind((Iterable<@NonNull E>) getDelegate(), predicate); + // Unsafe, but we can't do much about it now. + return Iterables.<@NonNull E>tryFind((Iterable<@NonNull E>) getDelegate(), predicate); } /** diff --git a/guava/src/com/google/common/collect/FluentIterable.java b/guava/src/com/google/common/collect/FluentIterable.java index 8d1b67864bbf..f5d7050ba86b 100644 --- a/guava/src/com/google/common/collect/FluentIterable.java +++ b/guava/src/com/google/common/collect/FluentIterable.java @@ -462,9 +462,9 @@ public final boolean allMatch(Predicate predicate) { * *

{@code Stream} equivalent: {@code stream.filter(predicate).findFirst()}. */ - @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. public final Optional<@NonNull E> firstMatch(Predicate predicate) { - return Iterables.tryFind((Iterable<@NonNull E>) getDelegate(), predicate); + // Unsafe, but we can't do much about it now. + return Iterables.<@NonNull E>tryFind((Iterable<@NonNull E>) getDelegate(), predicate); } /**