You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Nicky Sandhu <ni...@hotmail.com> on 2007/08/27 22:02:02 UTC
out body expressions
Shouldn't these methods used ExpressionBuilder.outBodyExpression()
/**
* Returns a predicate and value builder for the outbound body on an
* exchange
*/
public static <E extends Exchange> ValueBuilder<E> outBody() {
Expression<E> expression = ExpressionBuilder.bodyExpression();
return new ValueBuilder<E>(expression);
}
/**
* Returns a predicate and value builder for the outbound message body
as a
* specific type
*/
public static <E extends Exchange, T> ValueBuilder<E> outBody(Class<T>
type) {
Expression<E> expression = ExpressionBuilder.<E, T>
bodyExpression(type);
return new ValueBuilder<E>(expression);
}
--
View this message in context: http://www.nabble.com/out-body-expressions-tf4337934s22882.html#a12356586
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: out body expressions
Posted by James Strachan <ja...@gmail.com>.
On 8/27/07, Nicky Sandhu <ni...@hotmail.com> wrote:
>
> Shouldn't these methods used ExpressionBuilder.outBodyExpression()
>
> /**
> * Returns a predicate and value builder for the outbound body on an
> * exchange
> */
> public static <E extends Exchange> ValueBuilder<E> outBody() {
> Expression<E> expression = ExpressionBuilder.bodyExpression();
> return new ValueBuilder<E>(expression);
> }
>
> /**
> * Returns a predicate and value builder for the outbound message body
> as a
> * specific type
> */
> public static <E extends Exchange, T> ValueBuilder<E> outBody(Class<T>
> type) {
> Expression<E> expression = ExpressionBuilder.<E, T>
> bodyExpression(type);
> return new ValueBuilder<E>(expression);
> }
Great catch! DOH! (Yet another reminder we should aim for 100% test coverage :).
Patch applied with thanks!
--
James
-------
http://macstrac.blogspot.com/