Why ExchangeHelper.copyResults(Exchange, Exchange) method doesn't copy
exchange pattern from the source exchange? By default it is InOnly.

The following junit fails:

            Exchange source = new DefaultExchange(context, 
ExchangePattern.InOut);
            source.getIn().setBody("source body");
            
            Exchange copy = new DefaultExchange(context, 
ExchangePattern.InOnly);
            copy.getIn().setBody("copy body");
            
            ExchangeHelper.copyResults(copy, source);
            
            assertTrue(copy.getIn().getBody().equals("source body"));
            assertTrue(copy.getPattern().equals(ExchangePattern.InOut));   //
fails! pattern is still InOnly

Old copying method: "ex.copyFrom(exchange);"  copied also exchange pattern
to from exchange.

I'm using Camel 2.7.2, but I don't see any changes in 2.9.0 in that area.




--
View this message in context: 
http://camel.465427.n5.nabble.com/ExchangeHelper-copyResults-doesn-t-copy-exchange-pattern-tp5727506.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to