Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-242

FtpWagon class needs to handle possible null returned from ftpFiles[0].getTimestamp()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.0-beta-4
    • 1.0-beta-5
    • wagon-ftp
    • None
    • IBM z/OS Unix System Services

    Description

      The following line can return a null value, causing a null pointer exception in the code.

      FtpWagon.fillInputData()
      ...
      //@todo check how it works! javadoc of common login says:
      // Returns the file timestamp. This usually the last modification time.
      //
      long lastModified = ftpFiles[0].getTimestamp().getTimeInMillis();
      ...

      org.apache.commons.net.ftp.parser.UnixFTPEntryParser.parseFTPEntry()
      ...
      try
      {
      file.setTimestamp(super.parseTimestamp(datestr));
      }
      catch (ParseException e)
      {
      return null; // this is a parsing failure too.
      }
      ...

      Attachments

        Activity

          People

            brett Brett Porter
            drvanland D.R.
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: