mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8028785: [parfait] warnings from b116 for hotspot.src.share.vm.prims: JNI exception pending
Added JNI exception pending check in several files under src/share/vm/prims directory Reviewed-by: coleenp, minqi
This commit is contained in:
parent
a752b0b503
commit
afe8f1c904
4 changed files with 56 additions and 5 deletions
|
@ -858,6 +858,11 @@ static inline void throw_new(JNIEnv *env, const char *ename) {
|
|||
strcpy(buf, "java/lang/");
|
||||
strcat(buf, ename);
|
||||
jclass cls = env->FindClass(buf);
|
||||
if (env->ExceptionCheck()) {
|
||||
env->ExceptionClear();
|
||||
tty->print_cr("Unsafe: cannot throw %s because FindClass has failed", buf);
|
||||
return;
|
||||
}
|
||||
char* msg = NULL;
|
||||
env->ThrowNew(cls, msg);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue