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

FTPClient setSoTimeout (int time) will result in NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.2
    • FTP
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: