<i18n dev> RFR: 8269665: Clean-up toString() methods of some primitive wrappers [v2]

Сергей Цыпанов github.com+10835776+stsypanov at openjdk.java.net
Mon Aug 2 12:29:03 UTC 2021

On Mon, 2 Aug 2021 11:09:30 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> Сергей Цыпанов has updated the pull request incrementally with two additional commits since the last revision:
>>  - 8269665: Update copy-right year
>>  - 8269665: Reuse String.valueOf(boolean)
> src/java.base/share/classes/java/lang/Byte.java line 441:
>> 439:     @Override
>> 440:     public String toString() {
>> 441:         return toString(value);
> I'm a bit more skeptical about these changes that re-route from `Integer.toString(int)` to the local `Byte.toString(byte)` which will then call `Integer.toString(int)` anyhow. An extra indirection will likely not be seen having an effect in micros, but can mess things up due inlining heuristics and of course slightly hamper startup, so I would prefer leaving the code as is. Adding missing `@Override`s is fine, of course.



PR: https://git.openjdk.java.net/jdk/pull/4633

More information about the i18n-dev mailing list