RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name

2023-04-18 Thread Peter Hofer
Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` and `String.getBytes(Charset)` instead of passing the charset name. - Commit messages: - 8305746: InitializeEncoding should cache Charset object instead of charset name Changes: https://git.openjdk.org/jdk/p

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name

2023-04-18 Thread Peter Hofer
On Mon, 17 Apr 2023 17:47:04 GMT, Peter Hofer wrote: > Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` and > `String.getBytes(Charset)` instead of passing the charset name. @naotoj please find here my changes to `InitializeEncoding`. - PR Comment: https:/

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v2]

2023-04-18 Thread Peter Hofer
> Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` and > `String.getBytes(Charset)` instead of passing the charset name. Peter Hofer has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit: 8305746: Init

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v2]

2023-04-18 Thread Naoto Sato
On Tue, 18 Apr 2023 11:34:45 GMT, Peter Hofer wrote: >> Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` >> and `String.getBytes(Charset)` instead of passing the charset name. > > Peter Hofer has updated the pull request with a new target base due to a > merge or a reba

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v2]

2023-04-18 Thread Peter Hofer
On Tue, 18 Apr 2023 21:04:05 GMT, Naoto Sato wrote: >> Peter Hofer has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains one commit: >> >> 8305746: InitializeEncoding should cache Charset object instead of charset >> name > > src/jav

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v3]

2023-04-19 Thread Peter Hofer
> Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` and > `String.getBytes(Charset)` instead of passing the charset name. Peter Hofer has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brou

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v3]

2023-04-19 Thread Peter Hofer
On Wed, 19 Apr 2023 07:08:53 GMT, Peter Hofer wrote: >> Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` >> and `String.getBytes(Charset)` instead of passing the charset name. > > Peter Hofer has updated the pull request with a new target base due to a > merge or a reba

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v2]

2023-04-19 Thread Naoto Sato
On Wed, 19 Apr 2023 06:50:45 GMT, Peter Hofer wrote: >> src/java.base/share/native/libjava/jni_util.c line 757: >> >>> 755: jnuEncoding = (*env)->NewGlobalRef(env, charset.l); >>> 756: (*env)->DeleteLocalRef(env, charset.l); >>> 757: break; >> >>

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v3]

2023-04-19 Thread Naoto Sato
On Wed, 19 Apr 2023 07:08:53 GMT, Peter Hofer wrote: >> Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` >> and `String.getBytes(Charset)` instead of passing the charset name. > > Peter Hofer has updated the pull request with a new target base due to a > merge or a reba