From 925401bc0b3f6c3614357f059993cc8f8e686140 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 31 May 2023 19:09:50 +0000 Subject: [PATCH] [Java] Drop `L` prefix and `;` suffix in string FindClass call In a0760b79ab3365b9fa668006330aaa5bb456f824 we dropped most of these, but one was re-introduced recently for `String`, which is fixed here. Fixes #130 --- java_strings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java_strings.py b/java_strings.py index a1599125..1f8ef1a3 100644 --- a/java_strings.py +++ b/java_strings.py @@ -600,7 +600,7 @@ import javax.annotation.Nullable; res = res + "\t" + ty + "_clz = (*env)->FindClass(env, \"" + ty.replace("arr_of_", "[") + "\");\n" res = res + "\tCHECK(" + ty + "_clz != NULL);\n" res = res + "\t" + ty + "_clz = (*env)->NewGlobalRef(env, " + ty + "_clz);\n" - res = res + "\tString_clz = (*env)->FindClass(env, \"Ljava/lang/String;\");\n" + res = res + "\tString_clz = (*env)->FindClass(env, \"java/lang/String\");\n" res = res + "\tCHECK(String_clz != NULL);\n" res = res + "\tString_clz = (*env)->NewGlobalRef(env, String_clz);\n" -- 2.39.5