null type descriptor handling

This commit is contained in:
Keith Donald
2011-06-05 17:52:26 +00:00
parent 5f8faa3ae7
commit 8c6890605a
2 changed files with 24 additions and 3 deletions

View File

@@ -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)) {