Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-473

FTPClient setSoTimeout (int time) will result in NullPointerException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: