On Mon, 15 Jun 2026 16:44:13 GMT, Jaikiran Pai <[email protected]> wrote:
> As far as I can see, this constructor and the other one below which takes a > message and Throwable aren't used. Like other public APIs, would it be > preferable to not introduce these until there's an actual need for them? Quick exception type design considerations: general-purpose exceptions in should consider defined four constructors mirroring the four constructors on Throwable, Exception, and RuntimeException. (The JDK APIs aren't super consistent on this point and there have some partial efforts to regularize the sets of constructors on exceptions over the years.) I don't think IdentityException.java is general purpose in that sense; however, so I think it would be acceptable to define fewer exceptions initially. On the other hand, I don't think there is that much harm in defining "extra" constructors either. I do think it is preferable if IdentityException starts out as final though. HTH ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31123#discussion_r3416119896
