mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8291954: Use Optional.isEmpty instead of !Optional.isPresent in java.base
Reviewed-by: jpai, alanb, lancea, rriggs, bpb
This commit is contained in:
parent
87cda21c5d
commit
ae52053757
6 changed files with 21 additions and 23 deletions
|
@ -6780,7 +6780,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
|
|||
loopReturnType + ")");
|
||||
}
|
||||
|
||||
if (!pred.stream().filter(Objects::nonNull).findFirst().isPresent()) {
|
||||
if (pred.stream().noneMatch(Objects::nonNull)) {
|
||||
throw newIllegalArgumentException("no predicate found", pred);
|
||||
}
|
||||
if (pred.stream().filter(Objects::nonNull).map(MethodHandle::type).map(MethodType::returnType).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue