added support for null conversion point type

This commit is contained in:
Keith Donald
2009-05-17 03:09:59 +00:00
parent 18be2ffadc
commit d13567bc8f
2 changed files with 15 additions and 0 deletions

View File

@@ -158,6 +158,10 @@ public class GenericTypeConverter implements TypeConverter, ConverterRegistry {
throws ConverterNotFoundException {
Assert.notNull(sourceClass, "The sourceType to convert from is required");
Assert.notNull(targetType, "The targetType to convert to is required");
if (targetType.getType() == null) {
// TODO for Andy - is this correct way to handle the Null TypedValue?
return NoOpConversionExecutor.INSTANCE;
}
ConversionPoint sourceType = ConversionPoint.valueOf(sourceClass);
if (sourceType.isArray()) {
if (targetType.isArray()) {