From d2eddd7e4d3a7509fbebf87e11c1186073316be6 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Mon, 18 Dec 2000 15:53:52 +0000 Subject: [PATCH] Avoid NullPointerException in JDK 1.1 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268370 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Zip.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java index 4fde85e65..f543df55f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Zip.java +++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java @@ -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); } }