8171417: post jigsaw review cleanup in the jtreg jvmti tests

Fix the function throw_exc() in several jvmti tests to return void

Reviewed-by: dsamersoff, hseigel
This commit is contained in:
Serguei Spitsyn 2016-12-18 20:54:26 -08:00
parent ca6eb09ef7
commit 4590c71999
3 changed files with 21 additions and 9 deletions

View file

@ -81,14 +81,18 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
}
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;
}
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);
}
return JNI_ENV_PTR(env)->ThrowNew(JNI_ENV_ARG(env, exc_class), msg);
}
static