--- a/hotspot/test/serviceability/jvmti/AddModuleExportsAndOpens/libAddModuleExportsAndOpensTest.c Mon Dec 19 04:04:48 2016 +0000
+++ b/hotspot/test/serviceability/jvmti/AddModuleExportsAndOpens/libAddModuleExportsAndOpensTest.c Mon Dec 19 05:00:24 2016 +0000
@@ -82,14 +82,18 @@
}
static
-jint throw_exc(JNIEnv *env, char *msg) {
+void throw_exc(JNIEnv *env, char *msg) {
jclass exc_class = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env, EXC_CNAME));
+ jint rt = JNI_OK;
if (exc_class == NULL) {
printf("throw_exc: Error in FindClass(env, %s)\n", EXC_CNAME);
- return -1;
+ return;
}
- return JNI_ENV_PTR(env)->ThrowNew(JNI_ENV_ARG(env, exc_class), msg);
+ rt = JNI_ENV_PTR(env)->ThrowNew(JNI_ENV_ARG(env, exc_class), msg);
+ if (rt == JNI_ERR) {
+ printf("throw_exc: Error in JNI ThrowNew(env, %s)\n", msg);
+ }
}
static
--- a/hotspot/test/serviceability/jvmti/AddModuleReads/libAddModuleReadsTest.c Mon Dec 19 04:04:48 2016 +0000
+++ b/hotspot/test/serviceability/jvmti/AddModuleReads/libAddModuleReadsTest.c Mon Dec 19 05:00:24 2016 +0000
@@ -81,14 +81,18 @@
}
static
-jint throw_exc(JNIEnv *env, char *msg) {
+void throw_exc(JNIEnv *env, char *msg) {
jclass exc_class = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env, EXC_CNAME));
+ jint rt = JNI_OK;
if (exc_class == NULL) {
printf("throw_exc: Error in FindClass(env, %s)\n", EXC_CNAME);
- return -1;
+ return;
}
- return JNI_ENV_PTR(env)->ThrowNew(JNI_ENV_ARG(env, exc_class), msg);
+ rt = JNI_ENV_PTR(env)->ThrowNew(JNI_ENV_ARG(env, exc_class), msg);
+ if (rt == JNI_ERR) {
+ printf("throw_exc: Error in JNI ThrowNew(env, %s)\n", msg);
+ }
}
static
--- a/hotspot/test/serviceability/jvmti/AddModuleUsesAndProvides/libAddModuleUsesAndProvidesTest.c Mon Dec 19 04:04:48 2016 +0000
+++ b/hotspot/test/serviceability/jvmti/AddModuleUsesAndProvides/libAddModuleUsesAndProvidesTest.c Mon Dec 19 05:00:24 2016 +0000
@@ -82,14 +82,18 @@
}
static
-jint throw_exc(JNIEnv *env, char *msg) {
+void throw_exc(JNIEnv *env, char *msg) {
jclass exc_class = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env, EXC_CNAME));
+ jint rt = JNI_OK;
if (exc_class == NULL) {
printf("throw_exc: Error in FindClass(env, %s)\n", EXC_CNAME);
- return -1;
+ return;
}
- return JNI_ENV_PTR(env)->ThrowNew(JNI_ENV_ARG(env, exc_class), msg);
+ rt = JNI_ENV_PTR(env)->ThrowNew(JNI_ENV_ARG(env, exc_class), msg);
+ if (rt == JNI_ERR) {
+ printf("throw_exc: Error in JNI ThrowNew(env, %s)\n", msg);
+ }
}
static