mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +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
|
@ -4348,8 +4348,23 @@ static bool initializeDirectBufferSupport(JNIEnv* env, JavaThread* thread) {
|
|||
|
||||
// Get needed field and method IDs
|
||||
directByteBufferConstructor = env->GetMethodID(directByteBufferClass, "<init>", "(JI)V");
|
||||
if (env->ExceptionCheck()) {
|
||||
env->ExceptionClear();
|
||||
directBufferSupportInitializeFailed = 1;
|
||||
return false;
|
||||
}
|
||||
directBufferAddressField = env->GetFieldID(bufferClass, "address", "J");
|
||||
if (env->ExceptionCheck()) {
|
||||
env->ExceptionClear();
|
||||
directBufferSupportInitializeFailed = 1;
|
||||
return false;
|
||||
}
|
||||
bufferCapacityField = env->GetFieldID(bufferClass, "capacity", "I");
|
||||
if (env->ExceptionCheck()) {
|
||||
env->ExceptionClear();
|
||||
directBufferSupportInitializeFailed = 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((directByteBufferConstructor == NULL) ||
|
||||
(directBufferAddressField == NULL) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue