mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
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:
parent
ca6eb09ef7
commit
4590c71999
3 changed files with 21 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue