Commons Net
  1. Commons Net
  2. NET-338

ftp.FTPClient.initiateListParsing(String parserKey, String pathname) can call createFileEntryParser with null systemName

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: FTP
    • Labels:
      None

      Description

      ftp.FTPClient.initiateListParsing(String parserKey, String pathname) can call createFileEntryParser(String) with null systemName if the getSystemName() method fails.

      The resulting ParserInitializationException does not identify the cause.

      It would be better to throw a more specific error if the system name cannot be found.

      Ideally, getSystemName() should throw the error, but that would change the documented behaviour (null is specifically allowed as a return value).

      As it happens, getSystemName() is badly named, so one way forward is to create a new method getSystemType() which never returns null.

      Can then deprecate getSystemName().

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Sebb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development