2009/3/2 Claus Ibsen <[email protected]>: > Hi > > Looking into MessageSupport getBody(type) I was a bit puzzled with the > code vs. the comment > > The code below is from a old version, eg 1 year old. This is highly > what James have coded. > However as I see it we do the opposite, we covert the body = payload > first. And if its null then we do on the message itself. > > James, anyone?
sounds like a comment bug :) The idea was we're more likely to have a converter on a specific body type, so try that first - otherwise try converting the Message itself as a fallback. We can also pass in the Exchange/Message to a converter for a specific payload as well. > PS: The code in trunk is basically the same, except it catches the > NoTypeConverterException as we do not return null for non converters. Sounds good to me. -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/
