bind/java: revert byte array class workaround from CL 9783
After CL 10296 the workaround from CL 9783 is no longer necessary.
Revert the workaround but keep the global reference, just in case.
Change-Id: I3fdd580e4122c36508beb9d328739b910dbbe2e2
Reviewed-on: https://go-review.googlesource.com/10483
Reviewed-by: David Crawshaw <crawshaw@golang.org>
diff --git a/bind/java/seq_android.c b/bind/java/seq_android.c
index 3a3f067..ffaadb4 100644
--- a/bind/java/seq_android.c
+++ b/bind/java/seq_android.c
@@ -200,11 +200,7 @@
receive_handle_id = find_field(env, "go/Seq$Receive", "handle", "I");
receive_code_id = find_field(env, "go/Seq$Receive", "code", "I");
- // Find jbyteArray class info by instantiating a jbyteArray and getting
- // its class info, because finding the jbyteArray class ("[B") using
- // find_class_fn or JNIEnv's FindClass does not work on android-L.
- jbyteArray a = (*env)->NewByteArray(env, 0);
- jclass bclazz = (*env)->GetObjectClass(env, a);
+ jclass bclazz = find_class(env, "[B");
jbytearray_clazz = (*env)->NewGlobalRef(env, bclazz);
LOG_INFO("loaded go/Seq");