[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")
|
@SuppressWarnings("illegalcatch")
|
||||||
public static <T> Maybe<T> toMaybe(final Result<T> result) {
|
public static <T> Maybe<T> toMaybe(final Result<T> result) {
|
||||||
try {
|
try {
|
||||||
return Maybe.just(result.orElseThrow(Exception.class));
|
return Maybe.just(result.orElseThrow());
|
||||||
} catch (final Throwable throwable) {
|
} catch (final Throwable throwable) {
|
||||||
return Maybe.nothing();
|
return Maybe.nothing();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue