On Wed, 15 May 2024 09:51:13 GMT, Adam Sotona <[email protected]> wrote:
>> Claes Redestad has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Use sb.repeat, consolidate
>
> src/java.base/share/classes/java/lang/constant/ClassDesc.java line 341:
>
>> 339: String desc = descriptorString();
>> 340: int index = desc.lastIndexOf('/');
>> 341: return (index == -1) ? "" : internalToBinary(desc.substring(1,
>> index - 1));
>
> Here it cuts the package name, for example
> `ConstantDescs.CD_Integer.packageName()` returns `java.lan`
>
> Suggestion:
>
> return (index == -1) ? "" : internalToBinary(desc.substring(1,
> index));
Thanks! Verified there were tests covering this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19105#discussion_r1601383209