We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4cb49f commit 44374a5Copy full SHA for 44374a5
src/java.base/share/classes/java/util/Optional.java
@@ -394,7 +394,7 @@ public T orElseThrow() {
394
* @return the value, if present
395
* @throws X if no value is present
396
* @throws NullPointerException if no value is present and the exception
397
- * supplying function is {@code null}
+ * supplying function is {@code null} or produces a {@code null} result
398
*/
399
public <X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X {
400
if (value != null) {
0 commit comments