ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r354100 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java
Date Mon, 05 Dec 2005 17:08:16 GMT
Author: jkf
Date: Mon Dec  5 09:08:12 2005
New Revision: 354100

URL: http://svn.apache.org/viewcvs?rev=354100&view=rev
Log:
PR 37765: Fixing NPE, defect discovered by Dave Brosius

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java?rev=354100&r1=354099&r2=354100&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java Mon
Dec  5 09:08:12 2005
@@ -27,6 +27,7 @@
 import org.apache.tools.ant.taskdefs.LogStreamHandler;
 import org.apache.tools.ant.types.FileSet;
 import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.util.FileUtils;
 
 /**
  * Invokes the Metamata Audit/ Webgain Quality Analyzer on a set of Java files.
@@ -298,12 +299,7 @@
         } catch (IOException e) {
             throw new BuildException(e);
         } finally {
-            if (out == null) {
-                try {
-                    out.close();
-                } catch (IOException e) {
-                }
-            }
+            FileUtils.close(out);
         }
         return handler;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message