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

Instead of packing more stuff into SharedSecrets, how about moving some common 
utilities into package jdk.internal.util or a new package jdk.internal.string.
For example, Digits, HexDigits, DecimalDigits, OctalDigits.
That would make access better without the overhead shared secrets.

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

PR Comment: https://git.openjdk.org/jdk/pull/15651#issuecomment-1712866040

Reply via email to