Replace type specifier in Result constructor with diamond operator
This commit is contained in:
parent
eece4bf5ae
commit
1977c47590
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ public interface Result<T> {
|
||||||
* @return a successful Result
|
* @return a successful Result
|
||||||
*/
|
*/
|
||||||
static <T> Result<T> ok(final T value) {
|
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
|
* @return an error Result
|
||||||
*/
|
*/
|
||||||
static <T> Result<T> error(final Throwable error) {
|
static <T> Result<T> error(final Throwable error) {
|
||||||
return new Err<T>(error);
|
return new Err<>(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue