Browse Source

Re-order, don't even enter the try block if there is nothing to do

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@668625 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 17 years ago
parent
commit
09e0f524e6
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/Definer.java

+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/Definer.java View File

@@ -340,15 +340,15 @@ public abstract class Definer extends DefBase {
if (message == null && !(file.isFile())) {
message = "File " + file + " is not a file";
}
try {
if (message == null) {
try {
return FileUtils.getFileUtils().getFileURL(file);
}
} catch (Exception ex) {
message =
"File " + file + " cannot use as URL: "
+ ex.toString();
}
}
// Here if there is an error
switch (onError) {
case OnError.FAIL_ALL:


Loading…
Cancel
Save