From a02e8e3d26c05fcd34aa44a7e48243dc43066da0 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Tue, 8 Mar 2011 23:41:47 +0100 Subject: [PATCH] [findbugs] Avoid futile attempt to change max pool size Javadoc for ScheduledThreadPoolExecutor says [1]: While ScheduledThreadPoolExecutor inherits from ThreadPoolExecutor, a few of the inherited tuning methods are not useful for it. In particular, because it acts as a fixed-sized pool using corePoolSize threads and an unbounded queue, adjustments to maximumPoolSize have no useful effect. [1] http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html Change-Id: I8eccb7d6544aa6e27f5fa064c19dddb2a706523f Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/lib/BatchingProgressMonitor.java | 1 - 1 file changed, 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java index bae616622..83857649c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java @@ -74,7 +74,6 @@ public Thread newThread(Runnable taskBody) { return thr; } }); - alarmQueue.setMaximumPoolSize(alarmQueue.getCorePoolSize()); alarmQueue.setContinueExistingPeriodicTasksAfterShutdownPolicy(false); alarmQueue.setExecuteExistingDelayedTasksAfterShutdownPolicy(false); alarmQueue.prestartAllCoreThreads();