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

FTPClient getModificationTime throws ArrayIndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0
    • None
    • None
    • None
    • Client Windows XP, Server unknown unix styly FTP server

    Description

      FTPClient is used to connect to FTP server via https, browse for files and get their age. The call to getModificationTime throws an ArrayOutOfBoundsException.

      Code:
      FTPClient ftpclient = new FTPClient();
      ftpclient.connect(server, port);
      log.debug("Connected");
      if (!ftpclient.login(user, password))

      { throw new Exception("Could not logon"); }

      log.debug("Logged in");
      String[] files = ftpclient.listNames(path);
      for (String f : files)

      { log.debug("Found file: ftp://" + server + ":" + port + f); String mt = ftpclient.getModificationTime(f); log.debug("File "+f+"was last modified "+mt); }

      Exception:
      java.lang.ArrayIndexOutOfBoundsException: 33
      at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534)
      at org.apache.commons.net.ftp.FTP.mdtm(FTP.java:1157)
      at org.apache.commons.net.ftp.FTPClient.getModificationTime(FTPClient.java:2382)
      ...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hiran Hiran Chaudhuri
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: