camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sverker Abrahamsson (JIRA)" <>
Subject [jira] [Commented] (CAMEL-9745) Splitter - Should skip null messages if iterator returns null
Date Tue, 22 Mar 2016 17:01:25 GMT


Sverker Abrahamsson commented on CAMEL-9745:

For TarIterator I wrote a suggestion for a solution, but it depends on knowing the size of
the file being spitted up and keeping track of how much is consumed. However, that is not
always the case as the input may just be an input stream (originally in the tar case from
a tape drive) so it falls back to the old logic so that case must be handled anyway. It might
be preferable to just do as you suggest and skip if null is returned from next(), hence no
need to keep track of the length of the data to be splitted. 

> Splitter - Should skip null messages if iterator returns null
> -------------------------------------------------------------
>                 Key: CAMEL-9745
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.16.2
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.16.3, 2.18.0, 2.17.1
> When splitting and using an iterator the usually hasNext -> next is paired so if hasNext
returns true, then next returns data. But there can be situations where this is tricky to
determine up front, and therefore a hasNext may return true, and then next() return null if
there was no data really. Then the splitter should just skip that null and continue.

This message was sent by Atlassian JIRA

View raw message