Commons Net
  1. Commons Net
  2. NET-473

FTPClient setSoTimeout (int time) will result in NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2
    • Component/s: FTP
    • Labels:
      None

      Description

      After creating FTPClient you are able to invoke org.apache.commons.net.SocketClient-> setSoTimeout () method which will result in NullPointerException.

      It happens because in SocketClient class Socket object is initialized with null. Shouldn't it be more sensible to create new socket from the socketFactory and don't wait for socket creation till connect() method, because it will be imposiible to do any configuration to the socket until you're connected.

        Activity

        Yuliya Polyeno created issue -
        Sebb made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.2 [ 12320140 ]
        Resolution Fixed [ 1 ]
        Sebb made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Yuliya Polyeno
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development