On Tue, 29 Jul 2025 15:00:11 GMT, Nizar Benalla <nbena...@openjdk.org> wrote:
>> Please review this patch that extends the javadoc of >> `UnsupportedOperationException` no-arg constructor, to clear up that the >> detail message is null. > > Nizar Benalla has updated the pull request incrementally with one additional > commit since the last revision: > > Feedback from Alexey. Overall, it looks good to me. What's left is agreeing on how the updated text is formatted in the source code. I'm unsure if a CSR is required. The specification isn't updated substantially for `RuntimeException`; the changes for `UnsupportedOperationException` are quite substantial, so submitting CSR would be a good idea to document the changes made. src/java.base/share/classes/java/lang/UnsupportedOperationException.java line 60: > 58: /** > 59: * Constructs a new {@code UnsupportedOperationException} with the > specified detail message and > 60: * cause. Suggestion: * Constructs a new {@code UnsupportedOperationException} with the specified * detail message and cause. I'm for wrapping the line after the word “specified” to fit into 80 columns. src/java.base/share/classes/java/lang/UnsupportedOperationException.java line 81: > 79: * Constructs a new {@code UnsupportedOperationException} with the > specified cause and a detail > 80: * message of {@code (cause==null ? null : cause.toString())} (which > 81: * typically contains the class and detail message of {@code cause}). This one is trickier. Wrapping the line will cause a ripple effect on the following lines, which I'd like to avoid or to minimise at least. Suggestion: * Constructs a new {@code UnsupportedOperationException} with the specified * cause and a detail message of * {@code (cause==null ? null : cause.toString())} (which * typically contains the class and detail message of {@code cause}). ------------- Changes requested by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26533#pullrequestreview-3097822567 PR Review Comment: https://git.openjdk.org/jdk/pull/26533#discussion_r2260779017 PR Review Comment: https://git.openjdk.org/jdk/pull/26533#discussion_r2260785918