db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1591077 - /db/derby/code/branches/10.10/java/engine/org/apache/derby/iapi/services/context/ContextService.java
Date Tue, 29 Apr 2014 20:04:19 GMT
Author: myrnavl
Date: Tue Apr 29 20:04:19 2014
New Revision: 1591077

URL: http://svn.apache.org/r1591077
Log:
DERBY-6352; Access denied ("java.lang.RuntimePermission" "modifyThread") highly intermittent,
but e.g. in store.RecoveryAfterBackup test
   backport of revision 1590817 from trunk; accepting that if we see an AccessControlException
in this spot in the code we let the thread finish on its own.   

Modified:
    db/derby/code/branches/10.10/java/engine/org/apache/derby/iapi/services/context/ContextService.java

Modified: db/derby/code/branches/10.10/java/engine/org/apache/derby/iapi/services/context/ContextService.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/engine/org/apache/derby/iapi/services/context/ContextService.java?rev=1591077&r1=1591076&r2=1591077&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/engine/org/apache/derby/iapi/services/context/ContextService.java
(original)
+++ db/derby/code/branches/10.10/java/engine/org/apache/derby/iapi/services/context/ContextService.java
Tue Apr 29 20:04:19 2014
@@ -560,10 +560,6 @@ public final class ContextService //OLD 
                 final Thread fActive = active;
 				if (cm.setInterrupted(c))
                 {
-                    // DERBY-6352; in some cases a SecurityException is seen
-                    // demanding an explicit granting of modifyThread
-                    // permission, which should not be needed for Derby, as we
-                    // should not have any system threads.
                     try {
                         AccessController.doPrivileged(
                                 new PrivilegedAction() {
@@ -573,25 +569,8 @@ public final class ContextService //OLD 
                                     }
                                 });
                     } catch (java.security.AccessControlException ace) {
-                        // if sane, ASSERT and stop. The Assert will
-                        // cause info on all current threads to be printed to
-                        // the console, and we're also adding details about
-                        // the thread causing the security exception.
-                        // if insane, rethrow, and if an IBM JVM, do a jvmdump
-                        if (SanityManager.DEBUG)
-                        {
-                            SanityManager.THROWASSERT("unexpectedly needing " +
-                                    "an extra permission, for thread: " +
-                                    fActive.getName() + " with state: "+
-                                    fActive.getState());
-                            ace.printStackTrace();
-                        }
-                        else {
-                            if (JVMInfo.isIBMJVM()) {
-                                JVMInfo.javaDump();
-                            }
-                            throw ace;
-                        }
+                        // DERBY-6352; if we see an exception here, just
+                        // swallow it, leaving the thread to finish
                     }
                 }
 			}



Mime
View raw message