// this is faster than getting throwing and catching NoTypeConversionAvailableException
// the StreamCachingInterceptor will attempt to convert the payload to a StremCache for caching purpose
// so we get invoked on each node the exchange passes. So this is a little performance optimization
// to avoid the excessive exception handling
if (body != null && converter instanceof DefaultTypeConverter) {
DefaultTypeConverter defaultTypeConverter = (DefaultTypeConverter) converter;
// we can only check if there is no converter meaning we have tried to convert it beforehand
// and then knows for sure there is no converter possible
tryConvert = !defaultTypeConverter.hasNoConverterFor(type, body.getClass());
}
if (tryConvert) {
try {
// lets first try converting the body itself first
// as for some types like InputStream v Reader its more efficient to do the transformation