ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r350260 - /ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java
Date Thu, 01 Dec 2005 14:56:29 GMT
Author: mbenson
Date: Thu Dec  1 06:56:25 2005
New Revision: 350260

URL: http://svn.apache.org/viewcvs?rev=350260&view=rev
Log:
Replace try-catch with a preemptive check.

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java?rev=350260&r1=350259&r2=350260&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java Thu Dec  1 06:56:25 2005
@@ -1042,14 +1042,7 @@
      */
     public String fromURI(String uri) {
         String path = Locator.fromURI(uri);
-
-        // catch exception if normalize thinks this is not an absolute path
-        try {
-            path = normalize(path).getAbsolutePath();
-        } catch (BuildException e) {
-            // relative path
-        }
-        return path;
+        return isAbsolutePath(path) ? normalize(path).getAbsolutePath() : path;
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message