From 3a3312cb529e779a359bffef7180f3334daa418d Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Mon, 18 Dec 2000 16:53:33 +0000 Subject: [PATCH] Avoid NullPointerException in if the current user is not allowed to list the contents of a directory. Reported by: "NIkhil R. Deshpande" git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268372 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Delete.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/org/apache/tools/ant/taskdefs/Delete.java b/src/main/org/apache/tools/ant/taskdefs/Delete.java index 40c4a086a..68e82efa7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Delete.java +++ b/src/main/org/apache/tools/ant/taskdefs/Delete.java @@ -270,6 +270,7 @@ public class Delete extends MatchingTask { protected void removeDir(File d) { String[] list = d.list(); + if (list == null) list = new String[0]; for (int i = 0; i < list.length; i++) { String s = list[i]; File f = new File(d, s);