RFR: 8358618: UnsupportedOperationException no-args constructor javadoc is not clear [v2]

Alexey Ivanov aivanov at openjdk.org
Tue Jul 29 14:48:04 UTC 2025


On Tue, 29 Jul 2025 14:37:10 GMT, Nizar Benalla <nbenalla at 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:
> 
>   review comments about consistency

Changes requested by aivanov (Reviewer).

src/java.base/share/classes/java/lang/UnsupportedOperationException.java line 49:

> 47:     /**
> 48:      * Constructs a new {@code UnsupportedOperationException} with the specified
> 49:      * detail message.

I think it makes sense to expand the description of this constructor with `“The cause is not initialized, and may subsequently be initialized by a call to {@link #initCause(Throwable)}.”` as per no-arg constructor.

-------------

PR Review: https://git.openjdk.org/jdk/pull/26533#pullrequestreview-3067935684
PR Review Comment: https://git.openjdk.org/jdk/pull/26533#discussion_r2240103648


More information about the core-libs-dev mailing list