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

Naoto Sato naoto at openjdk.org
Wed Apr 19 17:00:53 UTC 2023


On Wed, 19 Apr 2023 06:50:45 GMT, Peter Hofer <phofer at openjdk.org> 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;
>> 
>> Could return immediately
>
> No, then the method id cache would not get initialized below. But I will add a comment.

You are right, those init code should follow.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13499#discussion_r1171618399


More information about the core-libs-dev mailing list