8230104: JNU_IsInstanceOfByName needs const parameter
Reviewed-by: alanb, rriggs
Contributed-by: andrewluotechnologies@outlook.com
--- a/src/java.base/share/native/libjava/jni_util.c Fri Aug 23 19:55:08 2019 +0100
+++ b/src/java.base/share/native/libjava/jni_util.c Fri Aug 23 15:24:26 2019 -0400
@@ -1096,7 +1096,7 @@
}
JNIEXPORT jint JNICALL
-JNU_IsInstanceOfByName(JNIEnv *env, jobject object, char* classname)
+JNU_IsInstanceOfByName(JNIEnv *env, jobject object, const char* classname)
{
jclass cls;
if ((*env)->EnsureLocalCapacity(env, 1) < 0)
--- a/src/java.base/share/native/libjava/jni_util.h Fri Aug 23 19:55:08 2019 +0100
+++ b/src/java.base/share/native/libjava/jni_util.h Fri Aug 23 15:24:26 2019 -0400
@@ -208,7 +208,7 @@
* has been thrown.
*/
JNIEXPORT jint JNICALL
-JNU_IsInstanceOfByName(JNIEnv *env, jobject object, char *classname);
+JNU_IsInstanceOfByName(JNIEnv *env, jobject object, const char *classname);
/* Get or set class and instance fields.