From c3788e23d0df71303bf04558dd167196eff24b2f Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Thu, 1 Dec 2005 14:56:25 +0000 Subject: [PATCH] Replace try-catch with a preemptive check. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@350260 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/util/FileUtils.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/org/apache/tools/ant/util/FileUtils.java b/src/main/org/apache/tools/ant/util/FileUtils.java index 6104ec4e4..200b382d2 100644 --- a/src/main/org/apache/tools/ant/util/FileUtils.java +++ b/src/main/org/apache/tools/ant/util/FileUtils.java @@ -1042,14 +1042,7 @@ public class FileUtils { */ 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; } /**