https://bz.apache.org/bugzilla/show_bug.cgi?id=64438

            Bug ID: 64438
           Summary: FTP IOException causes NullPointerException
           Product: Ant
           Version: 1.10.7
          Hardware: PC
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Optional Tasks
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

ant version: 1.10.7, 1.10.8
regression introduced in commit: e6b44170a8419f01a5ea45b4917f569ca45aafff 

When an IOException exception occurs during an FTP session, the catch code may
yield a NullPointerException when the original exception cause is null.

This can be reproduced by trying to connect to a non existing FTP server using
the following snippet.

<ftp server="127.0.0.1" userid="..." password="..." />

Which would yield the following exception stack trace.

Caused by: java.lang.NullPointerException
        at
org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2614)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        ... 6 more

Here is the code snippet.

org/apache/tools/ant/taskdefs/optional/net/FTP.java:2614
        } catch (IOException ex) {
            String cause = ex.getCause().toString();
            if (cause != null) {
        ...

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to