ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r987722 - in /ant/ivy/ivyde/trunk: CHANGES.txt org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerState.java
Date Sat, 21 Aug 2010 10:37:04 GMT
Author: hibou
Date: Sat Aug 21 10:37:04 2010
New Revision: 987722

URL: http://svn.apache.org/viewvc?rev=987722&view=rev
Log:
IVYDE-253: as always, file urls were not properly handled. The bad behaviour has been kept
as a fallback for backward compatibility.

Modified:
    ant/ivy/ivyde/trunk/CHANGES.txt
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerState.java

Modified: ant/ivy/ivyde/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/CHANGES.txt?rev=987722&r1=987721&r2=987722&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/CHANGES.txt (original)
+++ ant/ivy/ivyde/trunk/CHANGES.txt Sat Aug 21 10:37:04 2010
@@ -8,6 +8,8 @@
 
 - IMPROVE: let IvyDE refresh workspace after a resolve (IVYDE-27) (thanks to Clint Burghduff)
 
+- FIX: Variable based path for ivysettings doesn't work it there are some spaces in the path
(IVYDE-253)
+
   version 2.1.0
 ==========================
 - NEW: Inclusion of Ivy related schemas into the Eclipse XML Catalog (IVYDE-190) (thanks
to Miguel Griffa)

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerState.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerState.java?rev=987722&r1=987721&r2=987722&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerState.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerState.java
Sat Aug 21 10:37:04 2010
@@ -23,6 +23,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.text.ParseException;
 import java.util.Collection;
@@ -181,7 +182,14 @@ public class IvyClasspathContainerState 
             throw ex;
         }
         if (url.getProtocol().startsWith("file")) {
-            File file = new File(url.getPath());
+            // first try the standard way
+            File file;
+            try {
+                file = new File(url.toURI());
+            } catch (URISyntaxException e) {
+                // probably a badly constructed url: "file://" + filename
+                file = new File(url.getPath());
+            }
             return getIvy(file);
         } else {
             // an URL but not a file



Mime
View raw message