Browse Source

fix NPE reported by Curt Arnold

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278239 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
8522387c40
2 changed files with 4 additions and 1 deletions
  1. +3
    -0
      WHATSNEW
  2. +1
    -1
      src/main/org/apache/tools/ant/DirectoryScanner.java

+ 3
- 0
WHATSNEW View File

@@ -204,6 +204,9 @@ Fixed bugs:


* DirectoryScanner.slowScan() was broken. Bugzilla report 34722. * DirectoryScanner.slowScan() was broken. Bugzilla report 34722.


* DirectoryScanner.scan() could throw a NullPointerException on
case-insensitive filesystems (read Windows or MacOS X).

Other changes: Other changes:
-------------- --------------




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

@@ -872,7 +872,7 @@ public class DirectoryScanner
} }
if ((myfile == null || !myfile.exists()) && !isCaseSensitive()) { if ((myfile == null || !myfile.exists()) && !isCaseSensitive()) {
File f = findFile(basedir, currentelement, false); File f = findFile(basedir, currentelement, false);
if (f.exists()) {
if (f != null && f.exists()) {
// adapt currentelement to the case we've // adapt currentelement to the case we've
// actually found // actually found
currentelement = FILE_UTILS.removeLeadingPath(basedir, currentelement = FILE_UTILS.removeLeadingPath(basedir,


Loading…
Cancel
Save