|
Description:
|
Incorrect:
public void mapFrom(CamelBindingData source, Context context) throws Exception {
Scope scope;
Message message = source.getMessage();
Exchange exchange = message.getExchange();
if (exchange.getIn() == source)
{ // <- THIS WILL NEVER MATCH
scope = IN;
}
else
{
scope = OUT;
}
// ...
Correct:
public void mapFrom(CamelBindingData source, Context context) throws Exception {
Scope scope;
Message message = source.getMessage();
Exchange exchange = message.getExchange();
if (exchange.getIn() == message) { // <- THIS IS THE FIX
scope = IN;
} else {
scope = OUT;
}
// ...
|