diff options
Diffstat (limited to 'libjava/classpath/external/jsr166/java/util/concurrent/ThreadPoolExecutor.java')
| -rw-r--r-- | libjava/classpath/external/jsr166/java/util/concurrent/ThreadPoolExecutor.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libjava/classpath/external/jsr166/java/util/concurrent/ThreadPoolExecutor.java b/libjava/classpath/external/jsr166/java/util/concurrent/ThreadPoolExecutor.java index ea89a2c082f..e303f14a827 100644 --- a/libjava/classpath/external/jsr166/java/util/concurrent/ThreadPoolExecutor.java +++ b/libjava/classpath/external/jsr166/java/util/concurrent/ThreadPoolExecutor.java @@ -669,8 +669,8 @@ public class ThreadPoolExecutor extends AbstractExecutorService { runLock.lock(); try { // If not shutting down then clear an outstanding interrupt. - if (runState != STOP && - Thread.interrupted() && + if (runState != STOP && + Thread.interrupted() && runState == STOP) // Re-interrupt if stopped after clearing thread.interrupt(); boolean ran = false; @@ -911,8 +911,8 @@ public class ThreadPoolExecutor extends AbstractExecutorService { */ public void shutdown() { // Fail if caller doesn't have modifyThread permission. - SecurityManager security = System.getSecurityManager(); - if (security != null) + SecurityManager security = System.getSecurityManager(); + if (security != null) security.checkPermission(shutdownPerm); boolean fullyTerminated = false; @@ -978,8 +978,8 @@ public class ThreadPoolExecutor extends AbstractExecutorService { */ public List<Runnable> shutdownNow() { // Almost the same code as shutdown() - SecurityManager security = System.getSecurityManager(); - if (security != null) + SecurityManager security = System.getSecurityManager(); + if (security != null) security.checkPermission(shutdownPerm); boolean fullyTerminated = false; |

