On Fri, 20 May 2022 20:02:28 GMT, Roger Riggs <[email protected]> wrote:
>> liach has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> Convert PrimitiveTypeInfo to an enum
>
> src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 932:
>
>> 930: */
>> 931: private static final class PrimitiveTypeInfo {
>> 932: private static final PrimitiveTypeInfo BYTE = new
>> PrimitiveTypeInfo(byte.class, 0);
>
> Can this be `private enum PrimitiveTypeInfo...` or perhaps a record class?
Thanks. I've converted it into an enum following the suit of
`sun.invoke.util.Wrapper`. I think an enum fits better here as we don't need
the canonical constructor and object methods of a record.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8801