RFR: 8331724: Refactor j.l.constant implementation to internal package [v10]

Claes Redestad redestad at openjdk.org
Wed May 15 10:35:37 UTC 2024


On Wed, 15 May 2024 09:51:13 GMT, Adam Sotona <asotona at openjdk.org> 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


More information about the core-libs-dev mailing list