Browse Source

fix potential NullPointerException - Bugzilla Issue 64438

master
Stefan Bodewig 5 years ago
parent
commit
4eb3b5b7d5
2 changed files with 9 additions and 2 deletions
  1. +6
    -0
      WHATSNEW
  2. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java

+ 6
- 0
WHATSNEW View File

@@ -1,6 +1,12 @@
Changes from Ant 1.10.8 TO Ant 1.10.9
=====================================

Fixed bugs:
-----------

* the ftp task could throw a NullPointerException if an error occured
Bugzilla Report 64438

Changes from Ant 1.10.7 TO Ant 1.10.8
=====================================



+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java View File

@@ -2611,9 +2611,10 @@ public class FTP extends Task implements FTPTaskConfig {
}

} catch (IOException ex) {
String cause = ex.getCause().toString();
final Throwable cause = ex.getCause();
if (cause != null) {
if (cause.contains("java.net.SocketTimeoutException")) {
final String msg = cause.toString();
if (msg != null && msg.contains("java.net.SocketTimeoutException")) {
// When a read timeout occurs, inform the server that it
// should abort.
// Note that the latest commons-net (3.6) still does not


Loading…
Cancel
Save