You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2008/06/17 13:58:55 UTC
svn commit: r668625 -
/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java
Author: bodewig
Date: Tue Jun 17 04:58:55 2008
New Revision: 668625
URL: http://svn.apache.org/viewvc?rev=668625&view=rev
Log:
Re-order, don't even enter the try block if there is nothing to do
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java?rev=668625&r1=668624&r2=668625&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java Tue Jun 17 04:58:55 2008
@@ -340,15 +340,15 @@
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: