File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
modules/collect/src/main/java/com/opengamma/strata/collect/result Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -461,7 +461,7 @@ public static <R> Result<R> ofNullable(R value) {
461
461
}
462
462
463
463
/**
464
- * Returns a success result containing the value is present, else returns a failure result
464
+ * Returns a success result containing the value if present, else returns a failure result
465
465
* with the specified reason and message.
466
466
* <p>
467
467
* The message is produced using a template that contains zero to many "{}" placeholders.
@@ -490,16 +490,14 @@ public static <R> Result<R> ofOptional(
490
490
}
491
491
492
492
/**
493
- * Returns a success result containing the value is present, else returns a failure result
493
+ * Returns a success result containing the value if present, else returns a failure result
494
494
* with a reason of {@link FailureReason#MISSING_DATA} and message to say an unexpected empty value was found.
495
495
*
496
496
* @param <R> the expected type of the result
497
497
* @param value the potentially null value
498
498
* @return a success result if the value is non-null, else a failure result
499
499
*/
500
- public static <R > Result <R > ofOptional (
501
- Optional <R > value ) {
502
-
500
+ public static <R > Result <R > ofOptional (Optional <R > value ) {
503
501
return ofOptional (value , FailureReason .MISSING_DATA , "Found empty where a value was expected" );
504
502
}
505
503
You can’t perform that action at this time.
0 commit comments