hotspot/src/share/vm/prims/jvm.cpp
changeset 22897 77e1024a4a14
parent 22881 b16d7faa638d
child 23178 e7bdf3ea2a34
--- a/hotspot/src/share/vm/prims/jvm.cpp	Mon Feb 24 13:29:14 2014 +0100
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Mon Feb 24 10:28:22 2014 +0100
@@ -1241,7 +1241,11 @@
   if (HAS_PENDING_EXCEPTION) {
     pending_exception = Handle(THREAD, PENDING_EXCEPTION);
     CLEAR_PENDING_EXCEPTION;
-
+    // JVMTI has already reported the pending exception
+    // JVMTI internal flag reset is needed in order to report PrivilegedActionException
+    if (THREAD->is_Java_thread()) {
+      JvmtiExport::clear_detected_exception((JavaThread*) THREAD);
+    }
     if ( pending_exception->is_a(SystemDictionary::Exception_klass()) &&
         !pending_exception->is_a(SystemDictionary::RuntimeException_klass())) {
       // Throw a java.security.PrivilegedActionException(Exception e) exception