You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2020/05/14 09:25:44 UTC

[Bug 64438] New: FTP IOException causes NullPointerException

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: notifications@ant.apache.org
          Reporter: thomas.breining@ge.com
  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.

[Bug 64438] FTP IOException causes NullPointerException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64438

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |1.10.9
         Resolution|---                         |FIXED
                 OS|                            |All

--- Comment #1 from Stefan Bodewig <bo...@apache.org> ---
fixed with revision 4eb3b5b7d -
https://github.com/apache/ant/commit/4eb3b5b7d598f1f83b0a61ae815aef1c68351471

Thanks!

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