You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Brent W. (JIRA)" <ji...@apache.org> on 2010/03/05 00:39:27 UTC

[jira] Created: (NET-311) FTPClient.protected Socket _openDataConnection_(int command, String arg) returns null

FTPClient.protected Socket _openDataConnection_(int command, String arg) returns null
-------------------------------------------------------------------------------------

                 Key: NET-311
                 URL: https://issues.apache.org/jira/browse/NET-311
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 2.0
         Environment: Windows XP, but I would think not platform specific.
            Reporter: Brent W.


    protected Socket _openDataConnection_(int command, String arg)
      throws IOException
    {
        Socket socket;

        if (__dataConnectionMode != ACTIVE_LOCAL_DATA_CONNECTION_MODE &&
                __dataConnectionMode != PASSIVE_LOCAL_DATA_CONNECTION_MODE)
            return null;
        ....
     }




This if condition is impossible to satisfy.  Should be OR(||) instead of AND(&&).
__dataConnectionMode can not be set to 2 & 0 at the same time.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NET-311) FTPClient.protected Socket _openDataConnection_(int command, String arg) returns null

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-311:
---------------------

    Priority: Minor  (was: Blocker)

> FTPClient.protected Socket _openDataConnection_(int command, String arg) returns null
> -------------------------------------------------------------------------------------
>
>                 Key: NET-311
>                 URL: https://issues.apache.org/jira/browse/NET-311
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Windows XP, but I would think not platform specific.
>            Reporter: Brent W.
>            Priority: Minor
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
>     protected Socket _openDataConnection_(int command, String arg)
>       throws IOException
>     {
>         Socket socket;
>         if (__dataConnectionMode != ACTIVE_LOCAL_DATA_CONNECTION_MODE &&
>                 __dataConnectionMode != PASSIVE_LOCAL_DATA_CONNECTION_MODE)
>             return null;
>         ....
>      }
> This if condition is impossible to satisfy.  Should be OR(||) instead of AND(&&).
> __dataConnectionMode can not be set to 2 & 0 at the same time.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (NET-311) FTPClient.protected Socket _openDataConnection_(int command, String arg) returns null

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved NET-311.
----------------------

    Resolution: Invalid

I think you have overlooked that the comparisons are != rather than ==.

The condition is possible to satisfy.

It is of the form:

mode != ACTIVE && mode != PASSIVE

which (by de Morgan) is the same as

NOT (mode == ACTIVE || mode == PASSIVE)

Consider what happens if the mode is neither ACTIVE nor PASSIVE.

> FTPClient.protected Socket _openDataConnection_(int command, String arg) returns null
> -------------------------------------------------------------------------------------
>
>                 Key: NET-311
>                 URL: https://issues.apache.org/jira/browse/NET-311
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Windows XP, but I would think not platform specific.
>            Reporter: Brent W.
>            Priority: Blocker
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
>     protected Socket _openDataConnection_(int command, String arg)
>       throws IOException
>     {
>         Socket socket;
>         if (__dataConnectionMode != ACTIVE_LOCAL_DATA_CONNECTION_MODE &&
>                 __dataConnectionMode != PASSIVE_LOCAL_DATA_CONNECTION_MODE)
>             return null;
>         ....
>      }
> This if condition is impossible to satisfy.  Should be OR(||) instead of AND(&&).
> __dataConnectionMode can not be set to 2 & 0 at the same time.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NET-311) FTPClient.protected Socket _openDataConnection_(int command, String arg) returns null

Posted by "Brent W. (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brent W. updated NET-311:
-------------------------

    Priority: Blocker  (was: Major)

> FTPClient.protected Socket _openDataConnection_(int command, String arg) returns null
> -------------------------------------------------------------------------------------
>
>                 Key: NET-311
>                 URL: https://issues.apache.org/jira/browse/NET-311
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Windows XP, but I would think not platform specific.
>            Reporter: Brent W.
>            Priority: Blocker
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
>     protected Socket _openDataConnection_(int command, String arg)
>       throws IOException
>     {
>         Socket socket;
>         if (__dataConnectionMode != ACTIVE_LOCAL_DATA_CONNECTION_MODE &&
>                 __dataConnectionMode != PASSIVE_LOCAL_DATA_CONNECTION_MODE)
>             return null;
>         ....
>      }
> This if condition is impossible to satisfy.  Should be OR(||) instead of AND(&&).
> __dataConnectionMode can not be set to 2 & 0 at the same time.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (NET-311) FTPClient.protected Socket _openDataConnection_(int command, String arg) returns null

Posted by "Brent W. (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brent W. closed NET-311.
------------------------


After compiling the library on my own and doing some debugging, I realized this.  Sorry to have troubled you.

> FTPClient.protected Socket _openDataConnection_(int command, String arg) returns null
> -------------------------------------------------------------------------------------
>
>                 Key: NET-311
>                 URL: https://issues.apache.org/jira/browse/NET-311
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Windows XP, but I would think not platform specific.
>            Reporter: Brent W.
>            Priority: Minor
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
>     protected Socket _openDataConnection_(int command, String arg)
>       throws IOException
>     {
>         Socket socket;
>         if (__dataConnectionMode != ACTIVE_LOCAL_DATA_CONNECTION_MODE &&
>                 __dataConnectionMode != PASSIVE_LOCAL_DATA_CONNECTION_MODE)
>             return null;
>         ....
>      }
> This if condition is impossible to satisfy.  Should be OR(||) instead of AND(&&).
> __dataConnectionMode can not be set to 2 & 0 at the same time.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.