Replace type specifier in Result constructor with diamond operator

This commit is contained in:
Paul Campbell 2018-06-22 07:09:21 +01:00
parent eece4bf5ae
commit 1977c47590

View file

@ -41,7 +41,7 @@ public interface Result<T> {
* @return a successful Result
*/
static <T> Result<T> ok(final T value) {
return new Success<T>(value);
return new Success<>(value);
}
/**
@ -52,7 +52,7 @@ public interface Result<T> {
* @return an error Result
*/
static <T> Result<T> error(final Throwable error) {
return new Err<T>(error);
return new Err<>(error);
}
/**