You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Wayne Bagguley (JIRA)" <ji...@apache.org> on 2013/12/27 15:49:52 UTC
[jira] [Commented] (CAMEL-7100) CLONE - Camel Splitter eat up
exceptions recorded by the underlying Scanner
[ https://issues.apache.org/jira/browse/CAMEL-7100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13857510#comment-13857510 ]
Wayne Bagguley commented on CAMEL-7100:
---------------------------------------
This is still a problem.
In Java 7 the Scanner class now implements Closeable so the fix for 5767 does not work as the Splitter code handling the IOException never gets executed.
Furthermore there is an additional problem when using tokenize with grouping e.g.: from("file:inbox").split().tokenize("\n", 1000).streaming().to("activemq:queue:order");
In this case the Scanner object is wrapped in a GroupIterator and the code in the Splitter to handle the case of when the Scanner exited with an exception does not get executed because GroupIterator implements Closeable (and is not an instance of Scanner either). I.e. in both cases only the first case of the IF statement on line 149 of the Splitter class will be executed and this leads to no exception being thrown and incorrect behaviour whereby the incorrect number of split messages gets processed and the route exits with no errors.
> CLONE - Camel Splitter eat up exceptions recorded by the underlying Scanner
> ---------------------------------------------------------------------------
>
> Key: CAMEL-7100
> URL: https://issues.apache.org/jira/browse/CAMEL-7100
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.9.4, 2.10.2
> Reporter: Wayne Bagguley
> Assignee: Christian Müller
> Fix For: 2.9.5, 2.10.3, 2.11.0
>
>
> See http://camel.465427.n5.nabble.com/Trouble-with-split-tokenize-on-linux-td5721677.html for details
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)