--- old/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp 2019-09-11 09:51:21.771835533 -0400 +++ new/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp 2019-09-11 09:51:21.336426777 -0400 @@ -1034,7 +1034,7 @@ if (jap.get_ret_type() == T_VOID) { return NULL; - } else if (jap.get_ret_type() == T_OBJECT || jap.get_ret_type() == T_ARRAY) { + } else if (is_reference_type(jap.get_ret_type())) { return JNIHandles::make_local((oop) result.get_jobject()); } else { jvalue *value = (jvalue *) result.get_value_addr();