diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 6964599bb..bd35ada85 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -269,6 +269,7 @@ Philip Hourihane Phillip Wells Pierre Delisle Pierre Dittgen +riasol R Handerson Rami Ojares Randy Watler diff --git a/WHATSNEW b/WHATSNEW index 0b3885d8d..88f656d05 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -192,6 +192,9 @@ Fixed bugs: provided using non-fileset resource collections. Bugzilla Issue 50115. +* ftp chmod could throw a NPE. + Bugzilla report 50217. + Other changes: -------------- diff --git a/contributors.xml b/contributors.xml index 06be2cd3b..8f8879a07 100644 --- a/contributors.xml +++ b/contributors.xml @@ -1468,4 +1468,8 @@ Zdenek Wagner + + + riasol + diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java index 67e5e6606..405bfa539 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java @@ -2102,7 +2102,7 @@ public class FTP extends Task implements FTPTaskConfig { myReply = ftp.getReplyStrings(); for (int x = 0; x < myReply.length; x++) { - if (myReply[x].indexOf("200") == -1) { + if (myReply[x] != null && myReply[x].indexOf("200") == -1) { log(myReply[x], Project.MSG_WARN); } }