On Thu, 1 May 2025 00:01:08 GMT, Chen Liang <li...@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

Looks ok

src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java line 57:

> 55:      * @param loader the class loader in which to look up the types (null 
> means
> 56:      *               bootstrap class loader)
> 57:      * @throws IllegalArgumentException if the descriptor is invalid

Pre-existing; the other parameters should be documented too; especially the 
in/out index.

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

Marked as reviewed by rriggs (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24978#pullrequestreview-3145365755
PR Review Comment: https://git.openjdk.org/jdk/pull/24978#discussion_r2294339442

Reply via email to