Skip to content

Commit d9dbb15

Browse files
java-team-github-botGoogle Java Core Libraries
authored andcommitted
Fix one instance of incorrect nullability of type argument in FluentIterable.
RELNOTES=n/a PiperOrigin-RevId: 678224792
1 parent a3b5188 commit d9dbb15

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,9 @@ public final boolean allMatch(Predicate<? super E> predicate) {
465465
*
466466
* <p><b>{@code Stream} equivalent:</b> {@code stream.filter(predicate).findFirst()}.
467467
*/
468-
@SuppressWarnings("nullness") // Unsafe, but we can't do much about it now.
469468
public final Optional<@NonNull E> firstMatch(Predicate<? super E> predicate) {
470-
return Iterables.<E>tryFind((Iterable<@NonNull E>) getDelegate(), predicate);
469+
// Unsafe, but we can't do much about it now.
470+
return Iterables.<@NonNull E>tryFind((Iterable<@NonNull E>) getDelegate(), predicate);
471471
}
472472

473473
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ public final boolean allMatch(Predicate<? super E> predicate) {
462462
*
463463
* <p><b>{@code Stream} equivalent:</b> {@code stream.filter(predicate).findFirst()}.
464464
*/
465-
@SuppressWarnings("nullness") // Unsafe, but we can't do much about it now.
466465
public final Optional<@NonNull E> firstMatch(Predicate<? super E> predicate) {
467-
return Iterables.<E>tryFind((Iterable<@NonNull E>) getDelegate(), predicate);
466+
// Unsafe, but we can't do much about it now.
467+
return Iterables.<@NonNull E>tryFind((Iterable<@NonNull E>) getDelegate(), predicate);
468468
}
469469

470470
/**

0 commit comments

Comments
 (0)