Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Roger Riggs
On Wed, 13 Sep 2023 01:24:05 GMT, Shaojin Wen 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 There's a lot of duplication exposed here

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Shaojin Wen
On Tue, 19 Sep 2023 16:15:12 GMT, Roger Riggs wrote: > There's a lot of duplication exposed here between the `digits` method and the > `getCharsLatin1` method that should be resolved. Can the callers of > `getCharsLatin1` be converted to use `digits`? > > We also should keep HexDigits and

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Jim Laskey
On Fri, 22 Sep 2023 11:37:18 GMT, Chen Liang 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 > >

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Shaojin Wen
On Fri, 22 Sep 2023 12:09:48 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/util/FormatItem.java line 148: >> >>> 146: int length = DecimalDigits.stringSize(value); >>> 147: this.digits = new byte[length]; >>> 148:

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Shaojin Wen
On Wed, 13 Sep 2023 01:24:05 GMT, Shaojin Wen 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 @cl4es can you help me to review this PR?

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Jim Laskey
On Fri, 22 Sep 2023 13:50:37 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 115: >> >>> 113: } >>> 114: return 10 + d; >>> 115: } >> >> @wenshao How about of using >>

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Shaojin Wen
On Fri, 22 Sep 2023 04:46:36 GMT, Chen Liang wrote: > Do Octal and Hex digits need int versions of getChars and stringSize? Since DecimalDigits made this change, for consistency, Octal and Hex digits also do the same thing. - PR Comment:

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Andriy Plokhotnyuk
On Wed, 13 Sep 2023 01:24:05 GMT, Shaojin Wen 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

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Shaojin Wen
On Fri, 22 Sep 2023 11:53:18 GMT, Andriy Plokhotnyuk 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 > >

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread ExE Boss
On Wed, 13 Sep 2023 01:24:05 GMT, Shaojin Wen 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 The `throws Throwable` declarations are no 

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Jim Laskey
On Wed, 13 Sep 2023 01:24:05 GMT, Shaojin Wen 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 Changes requested by jlaskey (Reviewer).

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread wickund
On Wed, 13 Sep 2023 01:24:05 GMT, Shaojin Wen 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 Changes requested by wick...@github.com

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Chen Liang
On Wed, 13 Sep 2023 01:24:05 GMT, Shaojin Wen 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 Changes requested by liach (Author).

RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread Shaojin Wen
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 - Commit messages: - Revert FormatItem related changes - restore

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

2023-09-30 Thread 温绍锦
On Tue, 19 Sep 2023 16:15:12 GMT, Roger Riggs wrote: > There's a lot of duplication exposed here between the `digits` method and the > `getCharsLatin1` method that should be resolved. Can the callers of > `getCharsLatin1` be converted to use `digits`? > > We also should keep HexDigits and

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

2023-09-29 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

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

2023-09-28 Thread 温绍锦
On Sun, 24 Sep 2023 02:46:38 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

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

2023-09-25 Thread Roger Riggs
On Sun, 24 Sep 2023 02:46:38 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

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

2023-09-23 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

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

2023-09-23 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

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

2023-09-23 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

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

2023-09-23 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

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

2023-09-23 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

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

2023-09-23 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 two additional commits since the last

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

2023-09-23 Thread ExE Boss
On Sat, 23 Sep 2023 17:44:51 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

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

2023-09-23 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 two additional commits since the last

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

2023-09-23 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

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

2023-09-23 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

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

2023-09-23 Thread 温绍锦
On Fri, 22 Sep 2023 12:09:48 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/util/FormatItem.java line 148: >> >>> 146: int length = DecimalDigits.stringSize(value); >>> 147: this.digits = new byte[length]; >>> 148:

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

2023-09-23 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

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

2023-09-23 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

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

2023-09-23 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

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

2023-09-23 Thread 温绍锦
On Sat, 23 Sep 2023 09:47:42 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

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

2023-09-23 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

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

2023-09-23 Thread Chen Liang
On Sat, 23 Sep 2023 07:39:59 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

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

2023-09-23 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

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

2023-09-22 Thread 温绍锦
On Fri, 22 Sep 2023 09:22:04 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

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

2023-09-22 Thread Jim Laskey
On Fri, 22 Sep 2023 13:50:37 GMT, 温绍锦 wrote: >> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 115: >> >>> 113: } >>> 114: return 10 + d; >>> 115: } >> >> @wenshao How about of using >>

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

2023-09-22 Thread 温绍锦
On Fri, 22 Sep 2023 11:53:18 GMT, Andriy Plokhotnyuk wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> restore HexDigits & OctalDigits > > src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 115: > >> 113:

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

2023-09-22 Thread Jim Laskey
On Fri, 22 Sep 2023 11:37:18 GMT, Chen Liang wrote: >> 温绍锦 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 148: > >> 146: int

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

2023-09-22 Thread Jim Laskey
On Fri, 22 Sep 2023 09:22:04 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

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

2023-09-22 Thread Andriy Plokhotnyuk
On Fri, 22 Sep 2023 09:22:04 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

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

2023-09-22 Thread wickund
On Fri, 22 Sep 2023 09:22:04 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

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

2023-09-22 Thread Chen Liang
On Fri, 22 Sep 2023 09:22:04 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

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

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

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

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

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

2023-09-21 Thread Chen Liang
On Fri, 22 Sep 2023 04:10:26 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 with a new

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

2023-09-21 Thread 温绍锦
On Fri, 22 Sep 2023 04:46:36 GMT, Chen Liang wrote: > Do Octal and Hex digits need int versions of getChars and stringSize? Since DecimalDigits made this change, for consistency, Octal and Hex digits also do the same thing. - PR Comment:

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

2023-09-21 Thread Chen Liang
On Fri, 22 Sep 2023 04:10:26 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 with a new

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

2023-09-21 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 with a new target base due to a merge or a rebase. The pull

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

2023-09-19 Thread Roger Riggs
On Wed, 13 Sep 2023 14:08:15 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

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

2023-09-13 Thread 温绍锦
On Wed, 13 Sep 2023 02:17:00 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

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

2023-09-13 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

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

2023-09-12 Thread Chen Liang
On Wed, 13 Sep 2023 02:17:00 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

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

2023-09-12 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

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

2023-09-12 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

RFR: 8316150: Refactor get chars and string size

2023-09-12 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 - Commit messages: - move StringLatin1::getChars to