Skip to content

Commit 52244ba

Browse files
authored
Merge pull request #22199 from JasonFengJ9/jnicalls
Fix JNI return types
2 parents 2f546a6 + 52cb561 commit 52244ba

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

runtime/jvmti/jvmtiModules.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ addModuleExportsOrOpens(jvmtiEnv* jvmtiEnv, jobject fromModule, const char* pkgN
129129
if (NULL == pkg) {
130130
rc = JVMTI_ERROR_OUT_OF_MEMORY;
131131
} else {
132-
(*env)->CallObjectMethod(env,
133-
fromModule,
134-
vm->addExports,
135-
pkg,
136-
toModule,
137-
!exports,
138-
JNI_TRUE);
132+
(*env)->CallVoidMethod(env,
133+
fromModule,
134+
vm->addExports,
135+
pkg,
136+
toModule,
137+
!exports,
138+
JNI_TRUE);
139139
}
140140
if ((*env)->ExceptionCheck(env)) {
141141
rc = JVMTI_ERROR_INTERNAL;
@@ -508,7 +508,7 @@ jvmtiAddModuleUses(jvmtiEnv* jvmtiEnv, jobject module, jclass service)
508508

509509
vm->addUses = addUses;
510510
}
511-
(*env)->CallObjectMethod(env, module, vm->addUses, service);
511+
(*env)->CallVoidMethod(env, module, vm->addUses, service);
512512
if ((*env)->ExceptionCheck(env)) {
513513
rc = JVMTI_ERROR_INTERNAL;
514514
}

runtime/jvmti/jvmtiThread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ jvmtiInterruptThread(jvmtiEnv *env,
513513
vm->vThreadInterrupt = vThreadInterrupt;
514514
}
515515

516-
jniEnv->CallObjectMethod(thread, vm->vThreadInterrupt);
516+
jniEnv->CallVoidMethod(thread, vm->vThreadInterrupt);
517517

518518
if (jniEnv->ExceptionCheck()) {
519519
rc = JVMTI_ERROR_INTERNAL;

0 commit comments

Comments
 (0)