RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS
Claes Redestad
redestad at openjdk.org
Sun Sep 10 17:28:37 UTC 2023
On Sun, 10 Sep 2023 16:15:01 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
Yes, moving java.util.Digits to jdk.internal.util was what I had in mind, too. SharedSecrets are only necessary when we have things that need to stay package-private, such as member functions on String. Static utilities like this are generally easier to maintain when they are public but in a non-exported package like jdk.internal.util.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15651#issuecomment-1712887622
More information about the security-dev
mailing list