RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v3]
liach
duke at openjdk.java.net
Thu May 26 23:42:30 UTC 2022
On Thu, 26 May 2022 22:51:39 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> liach has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - Merge branch 'master' into proxy-primitivetypeinfo
>> - Convert PrimitiveTypeInfo to an enum
>> - 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo
>
> src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 969:
>
>> 967: // single-char BaseType descriptor (see JVMS section 4.3.2)
>> 968: String baseTypeString = wrapper.basicTypeString();
>> 969: wrapperClassName = dotToSlash(wrapper.wrapperType().getName());
>
> Suggestion:
>
> wrapperClassName = wrapper.wrapperType().descriptorString();
>
>
> It may worth to replace similar use of `dotToSlash(c.getName())` pattern.
Unfortunately, we want an internal name (`xxx/Abc`) than a field descriptor (`Lxxx/Abc;`). But we can use descriptor string for the valueOf descriptor construction.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8801
More information about the core-libs-dev
mailing list