You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by pe...@apache.org on 2007/09/03 14:57:53 UTC

svn commit: r572302 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/util/FileUtils.java

Author: peterreilly
Date: Mon Sep  3 05:57:52 2007
New Revision: 572302

URL: http://svn.apache.org/viewvc?rev=572302&view=rev
Log:
Bugzilla 43292: filtermapper could throw an NPE. - change FileUtils to return an empty string rather than null for zero-length files

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=572302&r1=572301&r2=572302&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Mon Sep  3 05:57:52 2007
@@ -154,6 +154,9 @@
 * War task failed with "No WEB-INF/web.xml file was added" when called
   a second time. Bugzilla 43121.
 
+* FilterMapper could throw an NPE.
+  Bugzilla 43292.
+
 Other changes:
 --------------
 * <script> now has basic support for JavaFX scripts

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java?rev=572302&r1=572301&r2=572302&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java Mon Sep  3 05:57:52 2007
@@ -930,7 +930,7 @@
                 textBuffer.append(new String(buffer, 0, bufferLength));
             }
         }
-        return (textBuffer == null) ? null : textBuffer.toString();
+        return (textBuffer == null) ? "" : textBuffer.toString();
     }
 
     /**



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