|
|
|
@ -19,8 +19,8 @@ package org.springframework.beans; |
|
|
|
import java.beans.PropertyDescriptor; |
|
|
|
import java.beans.PropertyDescriptor; |
|
|
|
import java.beans.PropertyEditor; |
|
|
|
import java.beans.PropertyEditor; |
|
|
|
import java.lang.reflect.Array; |
|
|
|
import java.lang.reflect.Array; |
|
|
|
import java.lang.reflect.Field; |
|
|
|
|
|
|
|
import java.lang.reflect.Constructor; |
|
|
|
import java.lang.reflect.Constructor; |
|
|
|
|
|
|
|
import java.lang.reflect.Field; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
@ -214,6 +214,11 @@ class TypeConverterDelegate { |
|
|
|
logger.trace("No String constructor found on type [" + requiredType.getName() + "]", ex); |
|
|
|
logger.trace("No String constructor found on type [" + requiredType.getName() + "]", ex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
catch (Exception ex) { |
|
|
|
|
|
|
|
if (logger.isTraceEnabled()) { |
|
|
|
|
|
|
|
logger.trace("Construction via String failed for type [" + requiredType.getName() + "]", ex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
String trimmedValue = ((String) convertedValue).trim(); |
|
|
|
String trimmedValue = ((String) convertedValue).trim(); |
|
|
|
if (requiredType.isEnum() && "".equals(trimmedValue)) { |
|
|
|
if (requiredType.isEnum() && "".equals(trimmedValue)) { |
|
|
|
// It's an empty enum identifier: reset the enum value to null.
|
|
|
|
// It's an empty enum identifier: reset the enum value to null.
|
|
|
|
|