Skip to content

Commit

Permalink
Fixing return type of except method
Browse files Browse the repository at this point in the history
  • Loading branch information
porfanid committed Sep 3, 2023
1 parent b7ed736 commit 9c3bc28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mug/src/main/java/com/google/mu/util/Maybe.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ public static <T, E extends Throwable> Maybe<T, E> maybe(
*/
public static <T, E extends Throwable> Stream<Maybe<T, E>> maybeStream(
CheckedSupplier<? extends Stream<? extends T>, E> supplier) {
return maybe(supplier).map(s -> s.map(Maybe::<T, E>of)).orElse(e -> Stream.of(except(e)));
// assigning the correct value to the except by calling it using the static variable
return maybe(supplier).map(s -> s.map(Maybe::<T, E>of)).orElse(e -> Stream.of(Maybe.<T,E>except(e)));
}

/**
Expand Down

0 comments on commit 9c3bc28

Please sign in to comment.