8243453: java --describe-module failed with non-ASCII module name under non-UTF8 environment

Reviewed-by: alanb
This commit is contained in:
Toshio Nakamura 2020-05-04 19:01:27 +01:00 committed by Alan Bateman
parent e70d76d741
commit 90e8a0a3db

View file

@ -1958,7 +1958,7 @@ DescribeModule(JNIEnv *env, char *optString)
NULL_CHECK(cls);
NULL_CHECK(describeModuleID = (*env)->GetStaticMethodID(env, cls,
"describeModule", "(Ljava/lang/String;)V"));
NULL_CHECK(joptString = (*env)->NewStringUTF(env, optString));
NULL_CHECK(joptString = NewPlatformString(env, optString));
(*env)->CallStaticVoidMethod(env, cls, describeModuleID, joptString);
}