Worked around the problem using AspectJ: installed the aspect like the one below and added the logic which extracts a wrapped value if the supplied value is different from the expected property type. Because of the "around" advice, the advice code can change the value if needed.
Code:
import java.beans.PropertyDescriptor;
import org.springframework.core.MethodParameter;
public aspect TypeConverterIntercept {
pointcut converterProtected() : execution(protected Object org.springframework.beans.TypeConverterDelegate.convertIfNecessary(..));
pointcut convertIfNecessaryArgs(String propertyName, Object oldValue, Object newValue, Class requiredType,
PropertyDescriptor descriptor, MethodParameter methodParam):
converterProtected() && args(propertyName, oldValue, newValue, requiredType, descriptor, methodParam);
Object around(String propertyName, Object oldValue, Object newValue, Class requiredType,
PropertyDescriptor descriptor, MethodParameter methodParam) :
convertIfNecessaryArgs(propertyName, oldValue, newValue, requiredType, descriptor, methodParam)
{
newValue = ConvertInterceptorRegistry.processIntercept(propertyName, oldValue, newValue, requiredType, descriptor);
return proceed(propertyName, oldValue, newValue, requiredType, descriptor, methodParam);
}
}