Re: CamelContext.hasComponent()
I'm looking at code that conditionally adds activemq if configuration is provided at runtime, hence my use as a consumer. On 30 March 2016 at 11:25, Claus Ibsenwrote: > Just to add a bit context. > > This method is less intended for Camel end users, but more for > component developers / camel itself. > > > On Wed, Mar 30, 2016 at 12:00 PM, Claus Ibsen > wrote: > > No this is by design > > > > On Wed, Mar 30, 2016 at 11:56 AM, James Green > wrote: > >> I was expecting this to return boolean, but it returns a Component if > >> present or null otherwise. > >> > >> This feels counter-intuitive and horrible to code against. Are there > plans > >> to this this? > >> > >> Thanks, > >> > >> James > > > > > > > > -- > > Claus Ibsen > > - > > http://davsclaus.com @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 >
Re: CamelContext.hasComponent()
Just to add a bit context. This method is less intended for Camel end users, but more for component developers / camel itself. On Wed, Mar 30, 2016 at 12:00 PM, Claus Ibsenwrote: > No this is by design > > On Wed, Mar 30, 2016 at 11:56 AM, James Green > wrote: >> I was expecting this to return boolean, but it returns a Component if >> present or null otherwise. >> >> This feels counter-intuitive and horrible to code against. Are there plans >> to this this? >> >> Thanks, >> >> James > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Re: CamelContext.hasComponent()
No this is by design On Wed, Mar 30, 2016 at 11:56 AM, James Greenwrote: > I was expecting this to return boolean, but it returns a Component if > present or null otherwise. > > This feels counter-intuitive and horrible to code against. Are there plans > to this this? > > Thanks, > > James -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
CamelContext.hasComponent()
I was expecting this to return boolean, but it returns a Component if present or null otherwise. This feels counter-intuitive and horrible to code against. Are there plans to this this? Thanks, James