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

initiateListParsing does not correctly check if parserKey was cached

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.4
    • Component/s: FTP
    • Labels:
      None

      Description

      At line 3232 of FTPClient, it is mentionned that the parserKey and entryParser are cached "to avoid creation of a new object every time a file listing is generated".

      However the test seems to be incorrect as a new entryParser is created every time the method "listFiles" is called. Indeed, in method named listFiles, the initiateListParsing is called with a null argument for the parserKey.
      So the test : "if(__entryParser == null || ! __entryParserKey.equals(parserKey))" is always true (even if __entryParserKey has been cached) and thus a new entryParser is created.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              queyruto Olivier Queyrut
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: