On Wed, Jun 30, 2010 at 10:08 AM, Willem Jiang <[email protected]> wrote: > Mikael Vik wrote: >> >> Thanks for all your help. I got the error in a testing context, and it was >> the camelContext on line 153 which was null. My bad. >> >> How about some more eager checking to discover if the value is null >> instead >> of failing in the try/catch clause in DefaultTypeConverter? For instance >> somewhere around here: >> org.apache.camel.impl.DefaultExchange.getProperty(DefaultExchange.java:128 >> if (value == null) { >> return null; >> } >> >> > > Camel DefaultTypeConverter will turn the null value into false if the Type > is boolean, so camel can't return the null directly. >
Ah yeah well spotted. I have reverted my quick fix. > BTW, exchange's context should not be null, I think I can add this check in > the ExchangeHelper; > > Willem > ---------------------------------- > Apache Camel, Apache CXF committer > Open SOA http://www.fusesource.com > Blog http://willemjiang.blogspot.com > Tiwtter http://twitter.com/willemjiang > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
