Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/jni.cpp @ 17704:56cd09c4a5c9
8028785: [parfait] warnings from b116 for hotspot.src.share.vm.prims: JNI exception pending
Summary: added JNI exception pending check in several files under src/share/vm/prims directory
Reviewed-by: coleenp, minqi
author | ccheung |
---|---|
date | Wed, 12 Feb 2014 12:01:45 -0800 |
parents | cc3f124c6eae |
children | 191174b49bec |
comparison
equal
deleted
inserted
replaced
17703:744553976af5 | 17704:56cd09c4a5c9 |
---|---|
4448 directBufferClass = (jclass) env->NewGlobalRef(directBufferClass); | 4448 directBufferClass = (jclass) env->NewGlobalRef(directBufferClass); |
4449 directByteBufferClass = (jclass) env->NewGlobalRef(directByteBufferClass); | 4449 directByteBufferClass = (jclass) env->NewGlobalRef(directByteBufferClass); |
4450 | 4450 |
4451 // Get needed field and method IDs | 4451 // Get needed field and method IDs |
4452 directByteBufferConstructor = env->GetMethodID(directByteBufferClass, "<init>", "(JI)V"); | 4452 directByteBufferConstructor = env->GetMethodID(directByteBufferClass, "<init>", "(JI)V"); |
4453 if (env->ExceptionCheck()) { | |
4454 env->ExceptionClear(); | |
4455 directBufferSupportInitializeFailed = 1; | |
4456 return false; | |
4457 } | |
4453 directBufferAddressField = env->GetFieldID(bufferClass, "address", "J"); | 4458 directBufferAddressField = env->GetFieldID(bufferClass, "address", "J"); |
4459 if (env->ExceptionCheck()) { | |
4460 env->ExceptionClear(); | |
4461 directBufferSupportInitializeFailed = 1; | |
4462 return false; | |
4463 } | |
4454 bufferCapacityField = env->GetFieldID(bufferClass, "capacity", "I"); | 4464 bufferCapacityField = env->GetFieldID(bufferClass, "capacity", "I"); |
4465 if (env->ExceptionCheck()) { | |
4466 env->ExceptionClear(); | |
4467 directBufferSupportInitializeFailed = 1; | |
4468 return false; | |
4469 } | |
4455 | 4470 |
4456 if ((directByteBufferConstructor == NULL) || | 4471 if ((directByteBufferConstructor == NULL) || |
4457 (directBufferAddressField == NULL) || | 4472 (directBufferAddressField == NULL) || |
4458 (bufferCapacityField == NULL)) { | 4473 (bufferCapacityField == NULL)) { |
4459 directBufferSupportInitializeFailed = 1; | 4474 directBufferSupportInitializeFailed = 1; |