On Sun, 10 Sep 2023 16:15:01 GMT, 温绍锦 <d...@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