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

温绍锦 duke at openjdk.org
Mon Sep 11 15:52:21 UTC 2023


> 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 with a new target base due to a merge or a rebase. The pull request now contains 12 commits:

 - fix merge conflict
 - Merge branch 'master' into reduce_duplicate
   
   # Conflicts:
   #	src/java.base/share/classes/java/lang/StringUTF16.java
 - 1. add override
   2. none static import
 - move java.lang.StringLatin1::getChars to jdk.internal.util.DecimalDigits::getCharsLatin1
 - remove duplicate stringSize
 - update related comments
 - remove java.util.Digits
 - move java.util.Digits/HexDigits to jdk.internal.util.Digits/HexDigits
 - move java.util.OctalDigits to jdk.internal.util.OctalDigits
 - none static import
 - ... and 2 more: https://git.openjdk.org/jdk/compare/d06a5643...9b9eeb2d

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

Changes: https://git.openjdk.org/jdk/pull/15651/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15651&range=08
  Stats: 692 lines in 15 files changed: 313 ins; 352 del; 27 mod
  Patch: https://git.openjdk.org/jdk/pull/15651.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15651/head:pull/15651

PR: https://git.openjdk.org/jdk/pull/15651



More information about the security-dev mailing list