RFR: 8356022: Migrate descriptor parsing from generics to BytecodeDescriptor
Chen Liang
liach at openjdk.org
Wed Aug 27 19:18:18 UTC 2025
On Thu, 1 May 2025 00:01:08 GMT, Chen Liang <liach at openjdk.org> wrote:
> As another step toward the removal of the old generics infrastructure, I propose to remove the usages of generic parsing utilities and use the facilities provided by BytecodeDescriptor, already used by MethodType.fromDescriptorString. This also prevents extra validation cost in use sites to defend against generic types.
>
> In this patch, BytecodeDescriptor and Wrapper see minor updates, mainly for better exception messages - previously, an unparseable char in the descriptor string just reports that char, and now the whole descriptor string is reported.
>
> These behaviors are already covered by the tests added in JDK-8350704 #23788.
>
> Testing: reflect/annotation/Class, running tier 1+2
Marking as draft to wait for #26909, which includes a fix tests in this patch depends on.
Tier 1-3 clear after the JDK-8366028 is fixed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24978#issuecomment-3216113208
PR Comment: https://git.openjdk.org/jdk/pull/24978#issuecomment-3229443903
More information about the core-libs-dev
mailing list