[result] toMaybe fix typo

This commit is contained in:
Paul Campbell 2018-10-04 07:55:34 +01:00
parent 538f8cb3d7
commit aed85d5488

View file

@ -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();
}