Re: RFR: 8316150: Refactor get chars and string size [v6]

2023-09-22 Thread ExE Boss
On Fri, 22 Sep 2023 07:19:27 GMT, 温绍锦  wrote:

>> 1. Reduce duplicate stringSize code
>> 2. Move java.lang.StringLatin1.getChars to 
>> jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other 
>> packages also need to use this method
>
> 温绍锦 has updated the pull request incrementally with one additional commit 
> since the last revision:
> 
>   restore HexDigits & OctalDigits

src/java.base/share/classes/java/util/FormatItem.java line 277:

> 275: this.hasPrefix = hasPrefix;
> 276: this.value = value;
> 277: this.length = HexDigits.INSTANCE.size(value);

Suggestion:

this.length = OctalDigits.INSTANCE.size(value);

-

PR Review Comment: https://git.openjdk.org/jdk/pull/15699#discussion_r1334053601


Re: RFR: 8316150: Refactor get chars and string size [v6]

2023-09-22 Thread 温绍锦
> 1. Reduce duplicate stringSize code
> 2. Move java.lang.StringLatin1.getChars to 
> jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other 
> packages also need to use this method

温绍锦 has updated the pull request incrementally with one additional commit since 
the last revision:

  restore HexDigits & OctalDigits

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/15699/files
  - new: https://git.openjdk.org/jdk/pull/15699/files/c0394e03..91db6031

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk=15699=05
 - incr: https://webrevs.openjdk.org/?repo=jdk=15699=04-05

  Stats: 134 lines in 4 files changed: 70 ins; 39 del; 25 mod
  Patch: https://git.openjdk.org/jdk/pull/15699.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15699/head:pull/15699

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