You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Manos Tsantakis (Jira)" <ji...@apache.org> on 2022/03/10 14:46:00 UTC

[jira] [Comment Edited] (CAMEL-17774) ZipIterator can have null ZipInputStream

    [ https://issues.apache.org/jira/browse/CAMEL-17774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17504316#comment-17504316 ] 

Manos Tsantakis edited comment on CAMEL-17774 at 3/10/22, 2:45 PM:
-------------------------------------------------------------------

I've used ZipSplitter which does the following:

 

{{{color:#cc7832}public {color}Object {color:#ffc66d}evaluate{color}(Exchange exchange) {}}
{{  Message inputMessage = exchange.getIn(){color:#cc7832};
{color}{color:#cc7832}  {color}InputStream inputStream = inputMessage.getBody(InputStream.{color:#cc7832}class{color}){color:#cc7832};
{color}{color:#cc7832}  return new {color}ZipIterator(exchange{color:#cc7832}, {color}inputStream){color:#cc7832};
{color}}}}

 

inputSteam here can be null (eg: The required TypeConverter cannot be matched)


was (Author: JIRAUSER286417):
I've used ZipSplitter which does the following:

 

{{{color:#cc7832}public {color}Object {color:#ffc66d}evaluate{color}(Exchange exchange) {}}
{{   Message inputMessage = exchange.getIn(){color:#cc7832};
{color}{color:#cc7832}   {color}InputStream inputStream = inputMessage.getBody(InputStream.{color:#cc7832}class{color}){color:#cc7832};
{color}{color:#cc7832}   return new {color}ZipIterator(exchange{color:#cc7832}, {color}inputStream){color:#cc7832};
{color}}}}

inputSteam here can be null (eg: The required TypeConverter cannot be matched)

> ZipIterator can have null ZipInputStream
> ----------------------------------------
>
>                 Key: CAMEL-17774
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17774
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-zipfile
>    Affects Versions: 3.14.2
>            Reporter: Manos Tsantakis
>            Priority: Minor
>
> The constructor of ZipIterator sets zipInputStream  to null in case of inputStream being null as well. {{}}
> [Here|https://github.com/apache/camel/blob/b92eef9ee18604e6e1d463f34f792b2eb73c6560/components/camel-zipfile/src/main/java/org/apache/camel/dataformat/zipfile/ZipIterator.java#L54]
> A null check [here|https://github.com/apache/camel/blob/b92eef9ee18604e6e1d463f34f792b2eb73c6560/components/camel-zipfile/src/main/java/org/apache/camel/dataformat/zipfile/ZipIterator.java#L51] would prevent that.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)