Author: maartenc
Date: Thu Sep 23 20:27:53 2010
New Revision: 1000609

URL: http://svn.apache.org/viewvc?rev=1000609&view=rev
Log:
FIX: ApacheURLLister doesn't handle some truncated linknames properly 
(IVY-1232) (thanks to John Tinetti)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/ApacheURLLister.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=1000609&r1=1000608&r2=1000609&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu Sep 23 20:27:53 2010
@@ -98,6 +98,7 @@ for detailed view of each issue, please 
        John Shields
        Simon Steiner
        Johan Stuyts
+       John Tinetti
        Jason Trump
        Tjeerd Verhagen
        Richard Vowles
@@ -128,6 +129,7 @@ for detailed view of each issue, please 
 - IMPROVEMENT: ivy:makepom now accepts a list of configurations to include 
(IVY-1005) (thanks to Jesper Pedersen)
 - IMPROVEMENT: ivy:makepom can generate a <description> element in the pom 
(IVY-1215) (thanks to Jesper Pedersen)
 
+- FIX: ApacheURLLister doesn't handle some truncated linknames properly 
(IVY-1232) (thanks to John Tinetti)
 - FIX: Ivy cannot handle Maven pom with parents depending back on theirselfs 
(IVY-1225)
 - FIX: OutOfMemoryError when uploading large files using commons-httpclient 
(IVY-1197) (thanks to Torkild U. Resheim)
 - FIX: artifactreport ant task doesn't honor log attribute (IVY-1212)

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/ApacheURLLister.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/ApacheURLLister.java?rev=1000609&r1=1000608&r2=1000609&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/ApacheURLLister.java 
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/ApacheURLLister.java 
Thu Sep 23 20:27:53 2010
@@ -163,6 +163,11 @@ public class ApacheURLLister {
                 if (!href.startsWith(text.substring(0, text.length() - 3))) {
                     continue;
                 }
+            } else if (text.endsWith("..&gt;")) {
+                // text is probably truncated, we can only check if the href 
starts with text
+                if (!href.startsWith(text.substring(0, text.length() - 6))) {
+                    continue;
+                }
             } else {
                 // text is not truncated, so it must match the url after 
stripping optional
                 // trailing slashes


Reply via email to