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

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.8.0
    • 3.10.0
    • camel-zipfile
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: