On Thu, 18 Jun 2026 14:53:50 GMT, Chen Liang <[email protected]> wrote:

>> I think it's reasonable to throw `IllegalArgumentException`, when `clazz` is 
>> not null and is an identity class. I had hesitated doing that for the same 
>> reason as you note - I don't have prior knowledge of these discussions.
>> 
>> I'll update this PR to throw the IAE, run existing tests and then wait for a 
>> few days to see if anyone says we should not throw the IAE.
>
> I think Roger maybe added this constructor out of convenience. I checked some 
> VM code and they seem to be never using this constructor; they have various 
> ways of constructing messages, often incorporating the action that requires 
> identity. Maybe we can consider removing this constructor too.

That might be the simplest, it would always be added later if there is a needed.

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

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

Reply via email to