From bfd67d9827222687179d729e452229ced75d4690 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 29 Apr 2009 10:22:00 +0000 Subject: [PATCH] Reduce scope - partial application of patch by Jens Kapitza from bug 46999 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@769734 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java b/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java index b7c14ff9d..0f0eab7c8 100644 --- a/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java +++ b/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java @@ -32,7 +32,7 @@ import java.util.concurrent.atomic.AtomicInteger; */ public class ThreadPoolExecutor extends java.util.concurrent.ThreadPoolExecutor { - final AtomicInteger activeCount = new AtomicInteger(0); + private final AtomicInteger activeCount = new AtomicInteger(0); public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue workQueue, RejectedExecutionHandler handler) { super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, handler); @@ -92,7 +92,7 @@ public class ThreadPoolExecutor extends java.util.concurrent.ThreadPoolExecutor super.execute(command); } catch (RejectedExecutionException rx) { if (super.getQueue() instanceof TaskQueue) { - TaskQueue queue = (TaskQueue)super.getQueue(); + final TaskQueue queue = (TaskQueue)super.getQueue(); try { if (!queue.force(command, timeout, unit)) { throw new RejectedExecutionException("Queue capacity is full."); @@ -108,7 +108,7 @@ public class ThreadPoolExecutor extends java.util.concurrent.ThreadPoolExecutor } } - static class RejectHandler implements java.util.concurrent.RejectedExecutionHandler { + private static class RejectHandler implements java.util.concurrent.RejectedExecutionHandler { public void rejectedExecution(Runnable r, java.util.concurrent.ThreadPoolExecutor executor) { throw new RejectedExecutionException(); } -- 2.11.0