RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS
Roger Riggs
rriggs at openjdk.org
Sun Sep 10 16:43:36 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
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
More information about the security-dev
mailing list