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:
Calvin Cheung 2014-02-12 12:01:45 -08:00
parent a752b0b503
commit afe8f1c904
4 changed files with 56 additions and 5 deletions

View file

@ -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) ||