diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java index bbb4784b7..fbed59f8d 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java @@ -185,7 +185,7 @@ public abstract class AbstractConnPool implements RefQueueHandler { // non-javadoc, see interface RefQueueHandler - public synchronized void handleReference(Reference ref) { + public synchronized void handleReference(Reference ref) { if (ref instanceof BasicPoolEntryRef) { // check if the GCed pool entry was still in use diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java index ccea83bfb..224cc2fd9 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java @@ -32,7 +32,6 @@ package org.apache.http.impl.conn.tsccm; import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; import org.apache.http.conn.HttpRoute; import org.apache.http.conn.OperatedClientConnection; diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java index a6f4d501e..6e110caaf 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java @@ -484,7 +484,7 @@ public class ConnPoolByRoute extends AbstractConnPool { // non-javadoc, see base class AbstractConnPool public synchronized void deleteClosedConnections() { - Iterator iter = freeConnections.iterator(); + Iterator iter = freeConnections.iterator(); while (iter.hasNext()) { BasicPoolEntry entry = (BasicPoolEntry) iter.next(); if (!entry.getConnection().isOpen()) { diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RefQueueHandler.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RefQueueHandler.java index 749557707..34047f1b3 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RefQueueHandler.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RefQueueHandler.java @@ -43,6 +43,6 @@ public interface RefQueueHandler { * * @param ref the reference to handle */ - public void handleReference(Reference ref) + public void handleReference(Reference ref) ; } diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RefQueueWorker.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RefQueueWorker.java index b53a2cd83..183107944 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RefQueueWorker.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RefQueueWorker.java @@ -53,7 +53,7 @@ public class RefQueueWorker implements Runnable { /** The reference queue to monitor. */ - protected final ReferenceQueue refQueue; + protected final ReferenceQueue refQueue; /** The handler for the references found. */ protected final RefQueueHandler refHandler; @@ -72,7 +72,7 @@ public class RefQueueWorker implements Runnable { * @param queue the queue on which to wait for references * @param handler the handler to pass the references to */ - public RefQueueWorker(ReferenceQueue queue, RefQueueHandler handler) { + public RefQueueWorker(ReferenceQueue queue, RefQueueHandler handler) { if (queue == null) { throw new IllegalArgumentException("Queue must not be null."); } @@ -100,7 +100,7 @@ public class RefQueueWorker implements Runnable { while (this.workerThread == Thread.currentThread()) { try { // remove the next reference and process it - Reference ref = refQueue.remove(); + Reference ref = refQueue.remove(); refHandler.handleReference(ref); } catch (InterruptedException e) { //@@@ is logging really necessary? this here is the diff --git a/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java b/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java index 99f5d1b32..b85d4af1d 100644 --- a/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java +++ b/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java @@ -302,7 +302,8 @@ public class TestTSCCMWithServer extends ServerTestBase { } // We now drop the hard references to the connection and trigger GC. - WeakReference wref = new WeakReference(conn); + WeakReference wref = + new WeakReference(conn); conn = null; httpContext = null; // holds a reference to the connection @@ -356,7 +357,8 @@ public class TestTSCCMWithServer extends ServerTestBase { // we got from the manager, directly as well as in the request // and in the context. The manager will be GCed only if the // connection wrapper is truly detached. - WeakReference wref = new WeakReference(mgr); + WeakReference wref = + new WeakReference(mgr); mgr = null; // Java does not guarantee that this will trigger the GC, but