null type descriptor handling

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4459 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Keith Donald
2011-06-05 17:52:26 +00:00
parent eaa8a4271c
commit 0fcbb35889
2 changed files with 24 additions and 3 deletions
@@ -132,7 +132,7 @@ class TypeConverterDelegate {
// No custom editor but custom ConversionService specified?
ConversionService conversionService = this.propertyEditorRegistry.getConversionService();
if (editor == null && conversionService != null && convertedValue != null) {
if (editor == null && conversionService != null && convertedValue != null && typeDescriptor != null) {
TypeDescriptor sourceTypeDesc = TypeDescriptor.forObject(newValue);
TypeDescriptor targetTypeDesc = typeDescriptor;
if (conversionService.canConvert(sourceTypeDesc, targetTypeDesc)) {