RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

Andrey Turbanov aturbanov at openjdk.org
Mon Sep 11 08:51:42 UTC 2023


On Mon, 11 Sep 2023 04:00:34 GMT, 温绍锦 <duke at openjdk.org> 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, which is also needed in other places, such as:
>> https://github.com/openjdk/jdk/pull/15555
>
> 温绍锦 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.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 index, byte[] buf) {

It's unused now. Do we expect usages to be added in following PRs?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15651#discussion_r1321206741



More information about the security-dev mailing list