On Fri, 26 Apr 2024 12:58:35 GMT, Chen Liang <li...@openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/constant/ClassDesc.java line 163:
>> 
>>> 161:         // implicit null-check
>>> 162:         return (descriptor.length() == 1)
>>> 163:                ? 
>>> Wrapper.forPrimitiveType(descriptor.charAt(0)).primitiveClassDescriptor()
>> 
>> Wait a second, it seems `ClassDesc.ofDescriptor("L")` will return 
>> `ConstantDescs.CD_Object` now. Might be good to have a test to verify this 
>> doesn't happen.
>
> Ignore me, `Wrapper.ofPrimitiveType` doesn't return Object.

No, `Wrapper.forPrimitiveType` throws IAE if passed `L`, same exception as 
today with a slightly different message. 

And yes, if this does not happen there's a test that fails.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18971#discussion_r1581042861

Reply via email to