Browse Source

Bugzilla 43292: filtermapper could throw an NPE. - change FileUtils to return an empty string rather than null for zero-length files

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@572302 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
a9592b869e
2 changed files with 4 additions and 1 deletions
  1. +3
    -0
      WHATSNEW
  2. +1
    -1
      src/main/org/apache/tools/ant/util/FileUtils.java

+ 3
- 0
WHATSNEW View File

@@ -154,6 +154,9 @@ Fixed bugs:
* War task failed with "No WEB-INF/web.xml file was added" when called * War task failed with "No WEB-INF/web.xml file was added" when called
a second time. Bugzilla 43121. a second time. Bugzilla 43121.


* FilterMapper could throw an NPE.
Bugzilla 43292.

Other changes: Other changes:
-------------- --------------
* <script> now has basic support for JavaFX scripts * <script> now has basic support for JavaFX scripts


+ 1
- 1
src/main/org/apache/tools/ant/util/FileUtils.java View File

@@ -930,7 +930,7 @@ public class FileUtils {
textBuffer.append(new String(buffer, 0, bufferLength)); textBuffer.append(new String(buffer, 0, bufferLength));
} }
} }
return (textBuffer == null) ? null : textBuffer.toString();
return (textBuffer == null) ? "" : textBuffer.toString();
} }


/** /**


Loading…
Cancel
Save