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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to