You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by ma...@apache.org on 2007/09/21 13:06:02 UTC
svn commit: r578092 - in /incubator/ivy/core/trunk: CHANGES.txt
src/java/org/apache/ivy/util/url/HttpClientHandler.java
test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
Author: maartenc
Date: Fri Sep 21 06:06:01 2007
New Revision: 578092
URL: http://svn.apache.org/viewvc?rev=578092&view=rev
Log:
FIX: java.lang.IllegalArgumentException: Invalid uri when working with version ranges (IVY-390)
Modified:
incubator/ivy/core/trunk/CHANGES.txt
incubator/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java
incubator/ivy/core/trunk/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
Modified: incubator/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/CHANGES.txt?rev=578092&r1=578091&r2=578092&view=diff
==============================================================================
--- incubator/ivy/core/trunk/CHANGES.txt (original)
+++ incubator/ivy/core/trunk/CHANGES.txt Fri Sep 21 06:06:01 2007
@@ -51,6 +51,7 @@
version in SVN
=====================================
+- FIX: java.lang.IllegalArgumentException: Invalid uri when working with version ranges (IVY-390)
- FIX: Ivy settings include -tag url attribute does not work correctly (IVY-601)
- FIX: Static revision replacement is not working when a dynamic revision is evicted by a transitive dependency (IVY-603) (with contribution from Matthias Kilian)
- FIX: NullPointerException whilst resolving transitive dependencies (IVY-590)
Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java?rev=578092&r1=578091&r2=578092&view=diff
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java Fri Sep 21 06:06:01 2007
@@ -126,6 +126,9 @@
+ "a proxy server that is not well configured.");
} catch (IOException e) {
Message.error("HttpClientHandler: " + e.getMessage() + " url=" + url);
+ } catch (IllegalArgumentException e) {
+ // thrown by HttpClient to indicate the URL is not valid, this happens for instance
+ // when trying to download a dynamic version (cfr IVY-390)
} finally {
if (head != null) {
head.releaseConnection();
Modified: incubator/ivy/core/trunk/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java?rev=578092&r1=578091&r2=578092&view=diff
==============================================================================
--- incubator/ivy/core/trunk/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java (original)
+++ incubator/ivy/core/trunk/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java Fri Sep 21 06:06:01 2007
@@ -19,6 +19,8 @@
import java.net.URL;
+import org.apache.ivy.util.url.URLHandler.URLInfo;
+
import junit.framework.TestCase;
/**
@@ -30,5 +32,15 @@
URLHandler handler = new HttpClientHandler();
assertTrue(handler.isReachable(new URL("http://www.google.fr/")));
assertFalse(handler.isReachable(new URL("http://www.google.fr/unknownpage.html")));
+ }
+
+ public void testGetURLInfo() throws Exception {
+ // IVY-390
+ URLHandler handler = new HttpClientHandler();
+ URLInfo info = handler
+ .getURLInfo(new URL(
+ "http://repo1.maven.org/maven2/commons-lang/commons-lang/[1.0,3.0[/commons-lang-[1.0,3.0[.pom"));
+
+ assertEquals(URLHandler.UNAVAILABLE, info);
}
}