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

Bug in MVSFTPEntryParser.parseUnixList (FindBugs)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.7
    • None
    • None

    Description

      FindBugs reports a bug in MVSFTPEntryParser#parseUnixList:

      "Bug: The parameter file to org.apache.commons.net.ftp.parser.MVSFTPEntryParser.parseUnixList(FTPFile, String) is dead upon entry but overwritten
      The initial value of this parameter is ignored, and the parameter is overwritten here. This often indicates a mistaken belief that the write to the parameter will be conveyed back to the caller."

      Since the other parsexxx() methods update the passed FTPFile parameter it looks like it was indeed the intention to update the parameter.

      Unfortunately there are no tests which exercise this code, and I have been unable to find examples of FTP LIST output for MVS in Unix mode. The code in preParse() looks for the string "total" at the start of the first line of output. [Presumably subsequent lines look like normal Unix FTP listings.]

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: