Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-706

FilePoller needs to add check for delete file before removing the file from workingset

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 3.0
    • 3.1
    • servicemix-components
    • None
    • Windows XP/JSE 6

    Description

      In the "processFileAndDelete(File aFile)" method of the org.apache.servicemix.components.file.FilePoller class, there is a finally block that contains a call to " workingSet.remove(aFile)". This is called regardless if the file should be deleted or not. Hence this works when the file is physically removed. If the file is not physically removed but is removed from the Set, this poller will pick up the same file(s) again and again in the "pollFile(final File aFile)" method. Maybe add a check in the finally block like this:
      **************************
      finally

      { if (!aFile.exists()) workingSet.remove(aFile); }

      *************************

      -los

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              moraleslos Los Morales
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: