Buggy code:
} catch ( ConversionFailedException ex ) { firstAttemptEx = ex ; } } } if ( ( editor != null ) || ( ( requiredType != null ) && ( ! ( ClassUtils . isAssignableValue ( requiredType , convertedValue ) ) ) ) ) { if ( ( ( requiredType != null ) && ( Collection . class . isAssignableFrom ( requiredType ) ) ) && ( convertedValue instanceof String ) ) { TypeDescriptor elementType = typeDescriptor . getElementTypeDescriptor ( ) ; if ( ( elementType != null ) && ( Enum . class . isAssignableFrom ( elementType . getType ( ) ) ) ) { convertedValue = StringUtils . commaDelimitedListToStringArray ( ( ( String ) ( convertedValue ) ) ) ; } } if ( editor == null ) { editor = findDefaultEditor ( requiredType , typeDescriptor ) ; } convertedValue = doConvertValue ( oldValue , convertedValue , requiredType , editor ) ; } if ( requiredType != null ) { if ( convertedValue != null ) { if ( requiredType . isArray ( ) ) { if ( ( convertedValue instanceof String ) && ( Enum . class . isAssignableFrom ( requiredType . getComponentType ( ) ) ) ) { convertedValue = StringUtils . commaDelimitedListToStringArray ( ( ( String ) ( convertedValue ) ) ) ; } return ( ( T ) ( convertToTypedArray ( convertedValue , propertyName , requiredType . getComponentType ( ) ) ) ) ; } else if ( convertedValue instanceof Collection ) { convertedValue = convertToTypedCollection ( ( ( Collection ) ( convertedValue ) ) , propertyName , requiredType , typeDescriptor ) ; } else if ( convertedValue instanceof Map ) { convertedValue = convertToTypedMap ( ( ( Map ) ( convertedValue ) ) , propertyName , requiredType , typeDescriptor ) ; } if ( ( convertedValue . getClass ( ) . isArray ( ) ) && ( ( Array . getLength ( convertedValue ) ) == 1 ) ) { convertedValue = Array . get ( convertedValue , 0 ) ; } if ( ( String . class . equals ( requiredType ) ) && ( ClassUtils . isPrimitiveOrWrapper ( convertedValue . getClass ( ) ) ) ) { return ( ( T ) ( convertedValue . toString ( ) ) ) ; } else if ( ( convertedValue instanceof String ) && ( ! ( requiredType . isInstance ( convertedValue ) ) ) ) { if ( ( ! ( requiredType . isInterface ( ) ) ) && ( ! ( requiredType . isEnum ( ) ) ) ) { try { Constructor strCtor = requiredType . getConstructor ( String . class ) ; return ( ( T ) ( BeanUtils . instantiateClass ( strCtor , convertedValue ) ) ) ; } catch ( NoSuchMethodException ex ) { if ( TypeConverterDelegate . logger . isTraceEnabled ( ) ) { TypeConverterDelegate . logger . trace ( ( ( "No<seq2seq4repair_space>String<seq2seq4repair_space>constructor<seq2seq4repair_space>found<seq2seq4repair_space>on<seq2seq4repair_space>type<seq2seq4repair_space>[" + ( requiredType . getName ( ) ) ) + "]" ) , ex ) ; } } catch ( Exception ex ) { if ( TypeConverterDelegate . logger . isDebugEnabled ( ) ) { TypeConverterDelegate . logger . debug ( ( ( "Construction<seq2seq4repair_space>via<seq2seq4repair_space>String<seq2seq4repair_space>failed<seq2seq4repair_space>for<seq2seq4repair_space>type<seq2seq4repair_space>[" + ( requiredType . getName ( ) ) ) + "]" ) , ex ) ; } } } String trimmedValue = ( ( String ) ( convertedValue ) ) . trim ( ) ; if ( ( requiredType . isEnum ( ) ) && ( "" . equals ( trimmedValue ) ) ) { return null ; } convertedValue = attemptToConvertStringToEnum ( requiredType , trimmedValue , convertedValue ) ; } } if ( ! ( ClassUtils . isAssignableValue ( requiredType , convertedValue ) ) ) { if ( firstAttemptEx != null ) { throw firstAttemptEx ; } StringBuilder msg = new StringBuilder ( ) ; msg . append ( "Cannot<seq2seq4repair_space>convert<seq2seq4repair_space>value<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>[" ) . append ( ClassUtils . getDescriptiveType ( newValue ) ) ; msg . append ( "]<seq2seq4repair_space>to<seq2seq4repair_space>required<seq2seq4repair_space>type<seq2seq4repair_space>[" ) . append ( ClassUtils . getQualifiedName ( requiredType ) ) . append ( "]" ) ; if ( propertyName != null ) { msg . append ( "<seq2seq4repair_space>for<seq2seq4repair_space>property<seq2seq4repair_space>'" ) . append ( propertyName ) . append ( "'" ) ; } if ( editor != null ) { msg . append ( ":<seq2seq4repair_space>PropertyEditor<seq2seq4repair_space>[" ) . append ( editor . getClass ( ) . getName ( ) ) . append ( "]<seq2seq4repair_space>returned<seq2seq4repair_space>inappropriate<seq2seq4repair_space>value<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>[" ) . append ( ClassUtils . getDescriptiveType ( convertedValue ) ) . append ( "]" ) ; throw new IllegalArgumentException ( msg . toString ( ) ) ; } else { msg . append ( ":<seq2seq4repair_space>no<seq2seq4repair_space>matching<seq2seq4repair_space>editors<seq2seq4repair_space>or<seq2seq4repair_space>conversion<seq2seq4repair_space>strategy<seq2seq4repair_space>found" ) ; throw new IllegalStateException ( msg . toString ( ) ) ; } } } if ( firstAttemptEx != null ) { <START_BUG> if ( editor == null ) { <END_BUG> throw firstAttemptEx ; } TypeConverterDelegate . logger . debug ( ( "Original<seq2seq4repair_space>ConversionService<seq2seq4repair_space>attempt<seq2seq4repair_space>failed<seq2seq4repair_space>-<seq2seq4repair_space>ignored<seq2seq4repair_space>since<seq2seq4repair_space>" + "PropertyEditor<seq2seq4repair_space>based<seq2seq4repair_space>conversion<seq2seq4repair_space>eventually<seq2seq4repair_space>succeeded" ) , firstAttemptEx ) ; } return ( ( T ) ( convertedValue ) ) ; } private Object attemptToConvertStringToEnum ( Class < ? > requiredType , String trimmedValue , Object currentConvertedValue ) { } protected PropertyEditor findDefaultEditor ( Class requiredType , TypeDescriptor typeDescriptor ) { } protected Object doConvertValue ( Object oldValue , Object newValue , Class < ? > requiredType , PropertyEditor editor ) { } protected Object doConvertTextValue ( Object oldValue , String newTextValue , PropertyEditor editor ) { } protected Object convertToTypedArray ( Object input , String propertyName , Class < ? > componentType ) { } @ SuppressWarnings ( "unchecked" ) protected Collection convertToTypedCollection ( Collection original , String propertyName , Class requiredType , TypeDescriptor typeDescriptor ) { } @ SuppressWarnings ( "unchecked" ) protected Map convertToTypedMap ( Map original , String propertyName , Class requiredType , TypeDescriptor typeDescriptor ) { } private String buildIndexedPropertyName ( String propertyName , int index ) { } private String buildKeyedPropertyName ( String propertyName , Object key ) { } private boolean canCreateCopy ( Class requiredType ) { } }

Fix:
if ( ( editor == null ) && ( convertedValue == newValue ) ) {