[result] toMaybe fix typo
This commit is contained in:
parent
538f8cb3d7
commit
aed85d5488
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ public interface Result<T> extends Functor<T, Result<?>> {
|
|||
@SuppressWarnings("illegalcatch")
|
||||
public static <T> Maybe<T> toMaybe(final Result<T> result) {
|
||||
try {
|
||||
return Maybe.just(result.orElseThrow(Exception.class));
|
||||
return Maybe.just(result.orElseThrow());
|
||||
} catch (final Throwable throwable) {
|
||||
return Maybe.nothing();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue