8331114: Further improve performance of MethodTypeDesc::descriptorString

Reviewed-by: mchung, liach
This commit is contained in:
Claes Redestad 2024-04-27 12:12:51 +00:00
parent e3eb652c25
commit a078b5e611
5 changed files with 33 additions and 15 deletions

View file

@ -160,7 +160,7 @@ public sealed interface ClassDesc
static ClassDesc ofDescriptor(String descriptor) {
// implicit null-check
return (descriptor.length() == 1)
? Wrapper.forPrimitiveType(descriptor.charAt(0)).primitiveClassDescriptor()
? Wrapper.forPrimitiveType(descriptor.charAt(0)).classDescriptor()
// will throw IAE on descriptor.length == 0 or if array dimensions too long
: new ReferenceClassDescImpl(descriptor);
}