On Tue, 4 Mar 2025 16:34:19 GMT, simon <d...@openjdk.org> wrote: > Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of > another possible cause of a NullPointerException - when the exception > supplying function returns a null result. > --------- > ### Progress > - [ ] Change must be properly reviewed (1 review required, with at least 1 > [Reviewer](https://openjdk.org/bylaws#reviewer)) > - [x] Change requires CSR request > [JDK-8354953](https://bugs.openjdk.org/browse/JDK-8354953) to be approved > - [x] Change must not contain extraneous whitespace > - [x] Commit message must refer to an issue > > ### Error > ⚠️ The pull request body must not be empty. > > > > ### Reviewing > <details><summary>Using <code>git</code></summary> > > Checkout this PR locally: \ > `$ git fetch https://git.openjdk.org/jdk.git pull/23905/head:pull/23905` \ > `$ git checkout pull/23905` > > Update a local copy of the PR: \ > `$ git checkout pull/23905` \ > `$ git pull https://git.openjdk.org/jdk.git pull/23905/head` > > </details> > <details><summary>Using Skara CLI tools</summary> > > Checkout this PR locally: \ > `$ git pr checkout 23905` > > View PR using the GUI difftool: \ > `$ git pr show -t 23905` > > </details> > <details><summary>Using diff file</summary> > > Download this PR as a diff file: \ > <a > href="https://git.openjdk.org/jdk/pull/23905.diff">https://git.openjdk.org/jdk/pull/23905.diff</a> > > </details>
Since this changes API specification text, we will need a small CSR for archival purposes noting the specification change. @RealCLanger since you have assigned yourself on the JBS, you might help with the CSR process too. You can comment > /oca verify and see if it's handled. Oops sorry, it should be > /signed I think Dalibor might be busy - You might email him again on the progress. I think we just wait for Dalibor... Well, now it is the beginning of the OCA verify process... Don't worry, this is a javadoc (specification) change with no behavioral change, so it can even go into JDK 25 after feature freeze (RDP1) Also please add some of your own text to the pull request body, like the first sentence of the issue report: > Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of > another possible cause of a NullPointerException - when the exception > supplying function returns a null result. Once you have pushed the changes, Chris or I may review this for integration. src/java.base/share/classes/java/util/Optional.java line 397: > 395: * @throws X if no value is present > 396: * @throws NullPointerException if no value is present and the > exception > 397: * supplying function or produces a {@code null} result Suggestion: * supplying function is {@code null} or produces a {@code null} result ------------- PR Comment: https://git.openjdk.org/jdk/pull/23905#issuecomment-2701562566 PR Comment: https://git.openjdk.org/jdk/pull/23905#issuecomment-2752822057 PR Comment: https://git.openjdk.org/jdk/pull/23905#issuecomment-2752863929 PR Comment: https://git.openjdk.org/jdk/pull/23905#issuecomment-2762865417 PR Comment: https://git.openjdk.org/jdk/pull/23905#issuecomment-2815460280 PR Comment: https://git.openjdk.org/jdk/pull/23905#issuecomment-2815985644 PR Comment: https://git.openjdk.org/jdk/pull/23905#issuecomment-2836386345 PR Review Comment: https://git.openjdk.org/jdk/pull/23905#discussion_r2064764964