Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16410

camel-zipfile - Unmarshal ZIP without error handling in Camel 3.8.0 when using split

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8.0
    • Fix Version/s: 3.10.0
    • Component/s: camel-zipfile
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      With the following route (defined in Groovy) :

      ZipFileDataFormat zipFile = new ZipFileDataFormat()
      zipFile.setUsingIterator(true)
      
      from("file:/path/to/zippedInput?antInclude=*.zip&delete=true")
                              .log('Detected file "${headers.CamelFileAbsolutePath}"')
                              .unmarshal(zipFile)
                              .split(bodyAs(Iterator)).streaming()
                              .to("file:/path/to/target/dir")
                              .log('Extracted file "${headers.CamelFileName}" to "${headers.CamelFileNameProduced}"')
                              .end()
      

      no error is thrown when an invalid zip file (empty file or any data file) is treated.

      The correction applied to CAMEL-14748 works only when usingIterator is false in org.apache.camel.dataformat.zipfile.ZipFileDataFormat#unmarshal.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                sdusart Sylvain Dusart
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: