8215495: Set isCopy to JNI_FALSE if len == 0
Set isCopy in a corner case
Reviewed-by: dholmes, phh, minqi
diff --git a/src/hotspot/share/prims/jni.cpp b/src/hotspot/share/prims/jni.cpp
index 48f5280..69bc4d0 100644
--- a/src/hotspot/share/prims/jni.cpp
+++ b/src/hotspot/share/prims/jni.cpp
@@ -2709,6 +2709,9 @@
ElementType* result; \
int len = a->length(); \
if (len == 0) { \
+ if (isCopy != NULL) { \
+ *isCopy = JNI_FALSE; \
+ } \
/* Empty array: legal but useless, can't return NULL. \
* Return a pointer to something useless. \
* Avoid asserts in typeArrayOop. */ \