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: