> Some codes in core libs are duplicated, including:
> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS
> java.util.DecimalDigits::size -> java.lang.Long.stringSize
>
> We can reduce duplication through JavaLangAccess, which is also needed in
> other places, such as:
> http
On Mon, 11 Sep 2023 04:00:34 GMT, 温绍锦 wrote:
>> Some codes in core libs are duplicated, including:
>> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS
>> java.util.DecimalDigits::size -> java.lang.Long.stringSize
>>
>> We can reduce duplication through JavaLangAccess, whic
On Mon, 11 Sep 2023 08:49:18 GMT, Andrey Turbanov wrote:
>> 温绍锦 has updated the pull request incrementally with two additional commits
>> since the last revision:
>>
>> - remove duplicate stringSize
>> - update related comments
>
> src/java.base/share/classes/jdk/internal/util/DecimalDigits.j
On Mon, 11 Sep 2023 09:38:44 GMT, Claes Redestad wrote:
>> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 201:
>>
>>> 199: * @return index of the most significant digit or minus sign, if
>>> present
>>> 200: */
>>> 201: public static int getChars(int i, int
On Mon, 11 Sep 2023 10:33:10 GMT, 温绍锦 wrote:
>> These weren't in `java.util.DecimalDigits` but have been copied from
>> `java.lang.StringLatin1` - part of an unfinished refactoring? There's no
>> clear-cut answer where these best fits but it seems reasonable to keep them
>> in `StringLatin1` a