Hi,
I added a test in org.apache.camel.impl.MessageSupportTest to reflect
the actual situation:
public void testGetBodyNoTypeConversionAvailable() throws Exception {
Exchange exchange = new DefaultExchange(context);
Message in = exchange.getIn();
final Country be = new Country();
be.setIso("BE");
be.setName("Belgium");
in.setBody(be, Country.class);
assertNull("Should'n the body throws a
NoTypeConversionAvailableException?", in.getBody(Integer.class));
}
The body is NOT null, but the convertor is not found. Shouldn't the
getBody method throw a NoTypeConversionAvailableException to express the
convertor has not been found?
Thanks for your comment,
--
Arnaud Vandyck
http://about.me/avdyk