Browse Source

Avoid NullPointerException in JDK 1.1

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268370 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
d2eddd7e4d
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      src/main/org/apache/tools/ant/taskdefs/Zip.java

+ 7
- 2
src/main/org/apache/tools/ant/taskdefs/Zip.java View File

@@ -23,7 +23,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* 4. The names "The Jakarta Project", "Ant", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -486,7 +486,12 @@ public class Zip extends MatchingTask {

while (!directories.isEmpty()) {
String dir = (String) directories.pop();
File f = new File(baseDir, dir);
File f = null;
if (baseDir != null) {
f = new File(baseDir, dir);
} else {
f = new File(dir);
}
zipDir(f, zOut, prefix+dir);
}
}


Loading…
Cancel
Save