You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ma...@apache.org on 2010/10/01 22:43:03 UTC

svn commit: r1003643 - /ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java

Author: maartenc
Date: Fri Oct  1 20:43:02 2010
New Revision: 1003643

URL: http://svn.apache.org/viewvc?rev=1003643&view=rev
Log:
The requested URL is no longer needed when creating the HttpClient instance.

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java?rev=1003643&r1=1003642&r2=1003643&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java Fri Oct  1 20:43:02 2010
@@ -128,7 +128,7 @@ public class HttpClientHandler extends A
     }
 
     public void upload(File src, URL dest, CopyProgressListener l) throws IOException {
-        HttpClient client = getClient(dest);
+        HttpClient client = getClient();
 
         PutMethod put = new PutMethod(normalizeToString(dest));
         put.setDoAuthentication(useAuthentication(dest) || useProxyAuthentication());
@@ -240,7 +240,7 @@ public class HttpClientHandler extends A
     }
 
     private GetMethod doGet(URL url, int timeout) throws IOException {
-        HttpClient client = getClient(url);
+        HttpClient client = getClient();
         client.setTimeout(timeout);
 
         GetMethod get = new GetMethod(normalizeToString(url));
@@ -251,7 +251,7 @@ public class HttpClientHandler extends A
     }
 
     private HeadMethod doHead(URL url, int timeout) throws IOException {
-        HttpClient client = getClient(url);
+        HttpClient client = getClient();
         client.setTimeout(timeout);
 
         HeadMethod head = new HeadMethod(normalizeToString(url));
@@ -260,7 +260,7 @@ public class HttpClientHandler extends A
         return head;
     }
 
-    private HttpClient getClient(URL url) {
+    private HttpClient getClient() {
         if (httpClient == null) {
             final MultiThreadedHttpConnectionManager connManager = 
                 new MultiThreadedHttpConnectionManager();