hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r721745 - /httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java
Date Sun, 30 Nov 2008 00:11:25 GMT
Author: sebb
Date: Sat Nov 29 16:11:25 2008
New Revision: 721745

URL: http://svn.apache.org/viewvc?rev=721745&view=rev
Log:
No point creating Long when we need long

Modified:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java?rev=721745&r1=721744&r2=721745&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java
Sat Nov 29 16:11:25 2008
@@ -72,7 +72,7 @@
      */
     public void add(HttpConnection connection, long validDuration, TimeUnit unit) {
         
-        Long timeAdded = Long.valueOf(System.currentTimeMillis());
+        long timeAdded = System.currentTimeMillis();
         
         if (log.isDebugEnabled()) {
             log.debug("Adding connection at: " + timeAdded);
@@ -127,8 +127,8 @@
         while (connectionIter.hasNext()) {
             HttpConnection conn = connectionIter.next();
             TimeValues times = connectionToTimes.get(conn);
-            Long connectionTime = times.timeAdded;
-            if (connectionTime.longValue() <= idleTimeout) {
+            long connectionTime = times.timeAdded;
+            if (connectionTime <= idleTimeout) {
                 if (log.isDebugEnabled()) {
                     log.debug("Closing connection, connection time: "  + connectionTime);
                 }



Mime
View raw message