Browse Source

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
master
Matthew Jason Benson 19 years ago
parent
commit
c3788e23d0
1 changed files with 1 additions and 8 deletions
  1. +1
    -8
      src/main/org/apache/tools/ant/util/FileUtils.java

+ 1
- 8
src/main/org/apache/tools/ant/util/FileUtils.java View File

@@ -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;
}

/**


Loading…
Cancel
Save