Skip to content

Commit

Permalink
Is this notiation prefered?
Browse files Browse the repository at this point in the history
  • Loading branch information
werli committed Jan 4, 2024
1 parent 63c398c commit 9cb537a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,7 @@ static final class OptionalIdentity<T> {
@BeforeTemplate
Optional<T> before(Optional<T> optional, Comparator<? super T> comparator) {
return Refaster.anyOf(
optional.or(() -> Optional.empty()),
optional.or(Optional::empty),
optional.or(Refaster.anyOf(() -> Optional.empty(), Optional::empty)),
optional.stream().findFirst(),
optional.stream().findAny(),
optional.stream().min(comparator),
Expand Down

0 comments on commit 9cb537a

Please sign in to comment.