2009/4/18 Claus Ibsen <[email protected]>:
> We could add boolean hasOut() as a method on the Exchange.
> Then you can test whether an OUT has been set or not.
>
> even though getOut(false) does exactly that. Returning null if no OUT exists.

This is not my point, that there is no clear way of verifying if there
is out or not. There is one you described.

The problem (I believe) is in the way getOut() method works. The
majority of developers assume, that getter (and getOut() conforms to
JavaBean getter) will not modify anything in a way that can seriously
influence future behavior. In the case of getOut() an invocation of
this method can change the flow VERY significantly (in pipeline when
there is no OUT).

Only this possible misunderstanding is my concern (and believe me - I
found a lot of cases when it happened to fresh camel riders)

Roman

Reply via email to