You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Stephan Siano (JIRA)" <ji...@apache.org> on 2016/03/07 08:03:40 UTC
[jira] [Commented] (CAMEL-9672) ClassCastException with
interceptFrom
[ https://issues.apache.org/jira/browse/CAMEL-9672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182666#comment-15182666 ]
Stephan Siano commented on CAMEL-9672:
--------------------------------------
One more comment about the patch: It does not contain a unit test because I was unsure where that would go. For testing I edited an arbitrary test in camel-test by adding above line to the route builder and overloding the useJms() method (that it always returns true instead of false) but I rather guess this is not the real place where the unit test for this should go.
> ClassCastException with interceptFrom
> -------------------------------------
>
> Key: CAMEL-9672
> URL: https://issues.apache.org/jira/browse/CAMEL-9672
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.16.2
> Reporter: Stephan Siano
> Priority: Minor
> Attachments: 0001-Relax-type-restriction-on-ManagedFilter.patch
>
>
> If a statement like
> {code:java}
> interceptFrom().when(simple("${header.foo} == 'bar'")).to("mock:intercepted");
> {code}
> is available in a route builder with JMX enabled the startup will fail in Camel 2.16.2 (and the current 2.17-SNAPSHOT) with a ClassCastException in line 310 of DefaultManagementObjectStrategy.
> The generated processor is a FilterProcessor, but the resulting definition is a WhenDefinition not a FilterDefinition.
> The reason is that CAMEL-8992 introduced a too precise class check for this.
> The attached patch relexes the class constraint on the definition.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)