On Fri, 19 Jun 2026 16:07:28 GMT, Jaikiran Pai <[email protected]> wrote:

>> src/java.base/share/classes/java/lang/IdentityException.java line 74:
>> 
>>> 72:      *               that the cause is nonexistent or unknown.
>>> 73:      */
>>> 74:     public IdentityException(Throwable cause) {
>> 
>> I’d rather we kept these, as it’s annoying to have to use 
>> [`Throwable​::initCause(…)`].
>> 
>> [`Throwable​::initCause(…)`]: 
>> https://docs.oracle.com/en/java/javase/26/docs/api/java.base/java/lang/Throwable.html#initCause(java.lang.Throwable)
>
> Hello @ExE-Boss, these can be reintroduced at some point, if there's a 
> genuine need for them. For new APIs, it's better to start off small, 
> including for exception types.

I think initially it will be more likely that IdentityException will another 
exception's cause rather than the other way around. As you say, additional 
constructors could be re-added if needed.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2562#discussion_r3443656470

Reply via email to