RFR: 8366028: MethodType::fromMethodDescriptorString should not throw UnsupportedOperationException for invalid descriptors [v2]

Chen Liang liach at openjdk.org
Mon Aug 25 17:23:36 UTC 2025


On Mon, 25 Aug 2025 17:14:16 GMT, ExE Boss <duke at openjdk.org> wrote:

>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   A case for malformed return type
>
> test/jdk/java/lang/invoke/MethodTypeTest.java line 233:
> 
>> 231:                 "(java/lang/Object)V",
>> 232:                 "()java/lang/Object",
>> 233:         };
> 
> And maybe also add a test case for an array type with too many dimensions in the return type:
> Suggestion:
> 
>                 "()java/lang/Object",
>                 "()" + "[".repeat(256) + "Ljava/lang/Object;",
>         };

I think this is overkill. This test is more for flavor; I intend main coverage to be in the new test for BytecodeDescriptors in #24978.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26909#discussion_r2298677339


More information about the core-libs-dev mailing list