[
https://issues.apache.org/jira/browse/CAMEL-16410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sylvain Dusart updated CAMEL-16410:
-----------------------------------
Description:
With the following route (defined in Groovy) :
{code}
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()
{code}
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_.
was:
With the following route :
{code}
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()
{code}
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_.
> Unmarshal ZIP without error handling in Camel 3.8.0 when using split
> --------------------------------------------------------------------
>
> Key: CAMEL-16410
> URL: https://issues.apache.org/jira/browse/CAMEL-16410
> Project: Camel
> Issue Type: Bug
> Components: camel-zipfile
> Affects Versions: 3.8.0
> Reporter: Sylvain Dusart
> Assignee: Omar Al-Safi
> Priority: Minor
>
> With the following route (defined in Groovy) :
> {code}
> 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()
> {code}
> 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_.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)