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

Claus Ibsen commented on CAMEL-267:
-----------------------------------

Aaron. 

Running latest camel trunk with your test case still fails. 
Hence I do not think CAMEL-320 fixed your issue.

{code}
-------------------------------------------------------------------------------
Test set: org.apache.camel.component.bean.PredicateAsBeanTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.531 sec <<< 
FAILURE!
testSendMessage(org.apache.camel.component.bean.PredicateAsBeanTest)  Time 
elapsed: 0.375 sec  <<< FAILURE!
junit.framework.ComparisonFailure: bean body: [EMAIL PROTECTED] 
expected:<Wobble> but was:<null>
        at junit.framework.Assert.assertEquals(Assert.java:81)
        at 
org.apache.camel.component.bean.PredicateAsBeanTest.testSendMessage(PredicateAsBeanTest.java:43)
{code}

> Predicate cannot be used as BeanProcessor
> -----------------------------------------
>
>                 Key: CAMEL-267
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-267
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Aaron Crickenberger
>            Priority: Minor
>         Attachments: PredicateAsBeanTest.java
>
>
> The current Bean Expression mechanism doesn't support the use of a Predicate 
> as the Bean/POJO.  The problem is that BeanInfo tries to use matches(Object) 
> instead of matches(Exchange).  If you use the extra "methodName" hint, this 
> happens because BeanInfo uses operations.get(name), which will only return 
> the most recently introspected method (potentially the Object one.)  If you 
> don't, then BeanInfo will try to find a method based on the inbound message 
> body type, ignoring methods that take Exchange as a parameter.
> This may too esoteric to bother working around?  It's relatively easy to 
> workaround for the common case (match the incoming body), but it's still a 
> little unexpected.  The only thing I can see this preventing is the use of 
> Predicates that are looking at multiple messages at once (eg: comparing delta 
> between in & out messages in an exchange.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Reply via email to