From 914beaeb4cc713c558098b0694fdb48fdfab473c Mon Sep 17 00:00:00 2001 From: Timothy Bish Date: Fri, 21 Feb 2014 12:15:13 -0500 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-5071 fix bad logger --- .../org/apache/activemq/thread/PooledTaskRunner.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/activemq-client/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java b/activemq-client/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java index 3657e12a5e..2425bc8217 100644 --- a/activemq-client/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java +++ b/activemq-client/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java @@ -22,7 +22,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * + * */ class PooledTaskRunner implements TaskRunner { @@ -41,6 +41,7 @@ class PooledTaskRunner implements TaskRunner { this.maxIterationsPerRun = maxIterationsPerRun; this.task = task; runable = new Runnable() { + @Override public void run() { runningThread = Thread.currentThread(); try { @@ -56,6 +57,7 @@ class PooledTaskRunner implements TaskRunner { /** * We Expect MANY wakeup calls on the same TaskRunner. */ + @Override public void wakeup() throws InterruptedException { synchronized (runable) { @@ -88,8 +90,9 @@ class PooledTaskRunner implements TaskRunner { * * @throws InterruptedException */ + @Override public void shutdown(long timeout) throws InterruptedException { - LOG.trace("Shutdown timeout: {} task: {}", task); + LOG.trace("Shutdown timeout: {} task: {}", timeout, task); synchronized (runable) { shutdown = true; // the check on the thread is done @@ -104,6 +107,7 @@ class PooledTaskRunner implements TaskRunner { } } + @Override public void shutdown() throws InterruptedException { shutdown(0); } @@ -132,7 +136,7 @@ class PooledTaskRunner implements TaskRunner { } } } finally { - synchronized( runable ) { + synchronized (runable) { iterating = false; runable.notifyAll(); if (shutdown) {