ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gscok...@apache.org
Subject svn commit: r647690 - /ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
Date Mon, 14 Apr 2008 08:14:40 GMT
Author: gscokart
Date: Mon Apr 14 01:14:35 2008
New Revision: 647690

URL: http://svn.apache.org/viewvc?rev=647690&view=rev
Log:
IVY-372 handle properly the absolute url (was ok for http:// protocol but was failing with
file:/ url)

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java?rev=647690&r1=647689&r2=647690&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java Mon Apr
14 01:14:35 2008
@@ -369,7 +369,13 @@
                     throw new IllegalArgumentException(
                         "bad include tag: specify file or url to include");
                 } else {
-                    settingsURL = new URL(this.settings , propFilePath);
+                    try {
+                        //First asume that it is an absolute URL
+                        settingsURL = new URL(propFilePath);
+                    } catch(MalformedURLException e) {
+                        //If that fail, it may be because it is a relative one.
+                        settingsURL = new URL(this.settings , propFilePath);
+                    }
                     Message.verbose("including url: " + settingsURL.toString());
                     ivy.setSettingsVariables(settingsURL);
                 }



Mime
View raw message