hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r603878 - in /jakarta/httpcomponents/httpclient/trunk/module-client: ./ src/main/java/org/apache/http/impl/conn/tsccm/ src/test/java/org/apache/http/conn/
Date Thu, 13 Dec 2007 10:51:53 GMT
Author: olegk
Date: Thu Dec 13 02:51:52 2007
New Revision: 603878

URL: http://svn.apache.org/viewvc?rev=603878&view=rev
Log:
Removed unnecessary casts; minor cleanups

Modified:
    jakarta/httpcomponents/httpclient/trunk/module-client/   (props changed)
    jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
    jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
    jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestHttpRoute.java

Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Dec 13 02:51:52 2007
@@ -3,3 +3,4 @@
 .project
 bin
 lib
+.settings

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java?rev=603878&r1=603877&r2=603878&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
(original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
Thu Dec 13 02:51:52 2007
@@ -256,7 +256,7 @@
         while (iter.hasNext()) {
             BasicPoolEntryRef per = iter.next();
             iter.remove();
-            BasicPoolEntry entry = (BasicPoolEntry) per.get();
+            BasicPoolEntry entry = per.get();
             if (entry != null) {
                 closeConnection(entry.getConnection());
             }

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java?rev=603878&r1=603877&r2=603878&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
(original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
Thu Dec 13 02:51:52 2007
@@ -486,7 +486,7 @@
 
         Iterator<BasicPoolEntry>  iter = freeConnections.iterator();
         while (iter.hasNext()) {
-            BasicPoolEntry entry = (BasicPoolEntry) iter.next();
+            BasicPoolEntry entry = iter.next();
             if (!entry.getConnection().isOpen()) {
                 iter.remove();
                 deleteEntry(entry);

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestHttpRoute.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestHttpRoute.java?rev=603878&r1=603877&r2=603878&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestHttpRoute.java
(original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestHttpRoute.java
Thu Dec 13 02:51:52 2007
@@ -34,6 +34,7 @@
 import java.net.InetAddress;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.Set;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
@@ -198,7 +199,7 @@
         assertTrue ("routettt.layer" , routettt.isLayered());
 
 
-        HashSet<HttpRoute> routes = new HashSet<HttpRoute>();
+        Set<HttpRoute> routes = new HashSet<HttpRoute>();
         routes.add(routefff);
         routes.add(routefft);
         routes.add(routeftf);
@@ -211,7 +212,7 @@
 
         // we can't test hashCode in general due to it's dependency
         // on InetAddress and HttpHost, but we can check for the flags
-        HashSet<Integer> routecodes = new HashSet<Integer>();
+        Set<Integer> routecodes = new HashSet<Integer>();
         routecodes.add(new Integer(routefff.hashCode()));
         routecodes.add(new Integer(routefft.hashCode()));
         routecodes.add(new Integer(routeftf.hashCode()));
@@ -223,7 +224,7 @@
         assertEquals("some flagged routes have same hashCode",
                      8, routecodes.size());
 
-        HashSet<String> routestrings = new HashSet<String>();
+        Set<String> routestrings = new HashSet<String>();
         routestrings.add(routefff.toString());
         routestrings.add(routefft.toString());
         routestrings.add(routeftf.toString());
@@ -390,7 +391,7 @@
 
         // now check that all of the routes are different from eachother
         // except for those that aren't :-)
-        HashSet<HttpRoute> routes = new HashSet<HttpRoute>();
+        Set<HttpRoute> routes = new HashSet<HttpRoute>();
         routes.add(route1a);
         routes.add(route2a);
         routes.add(route2b);
@@ -415,7 +416,7 @@
         }
 
         // and don't forget toString
-        HashSet<String> routestrings = new HashSet<String>();
+        Set<String> routestrings = new HashSet<String>();
         routestrings.add(route1a.toString());
         routestrings.add(route2a.toString());
         routestrings.add(route2b.toString());



Mime
View raw message