[lworld] RFR: 8287241: Add IdentityException to report that a value object is not valid [v3]
Roger Riggs
rriggs at openjdk.java.net
Thu Jun 9 15:03:57 UTC 2022
On Wed, 8 Jun 2022 21:55:54 GMT, Rémi Forax <forax at openjdk.org> wrote:
>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Tweaks to Objects.requireIdentity and IdentityException
>
> src/java.base/share/classes/java/lang/IdentityException.java line 69:
>
>> 67: public IdentityException(String message, Throwable cause) {
>> 68: super(message, cause);
>> 69: }
>
> There is a missing variant, the one with a Throwable but no message that you use when you want to throw an IdentityException as a result of a previous exception (by example an IllegalMonitorStateException).
It not clear where to draw the line on convenience methods (message can be null), but ok, added.
-------------
PR: https://git.openjdk.org/valhalla/pull/696
More information about the valhalla-dev
mailing list