Buggy code:
public class FormattingConversionService implements ConversionService , FormatterRegistry { private GenericConversionService conversionService = new GenericConversionService ( ) ; public FormattingConversionService ( ) { } public FormattingConversionService ( ConversionService parent ) { } public void addFormatterForFieldType ( Class < ? > fieldType , Printer < ? > printer , Parser < ? > parser ) { } public void addFormatterForFieldType ( Class < ? > fieldType , Formatter < ? > formatter ) { } @ SuppressWarnings ( "unchecked" ) public void addFormatterForFieldAnnotation ( final AnnotationFormatterFactory annotationFormatterFactory ) { } public ConverterRegistry getConverterRegistry ( ) { } public boolean canConvert ( Class < ? > sourceType , Class < ? > targetType ) { } @ SuppressWarnings ( "unchecked" ) public < T > T convert ( Object source , Class < T > targetType ) { } public boolean canConvert ( TypeDescriptor sourceType , TypeDescriptor targetType ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { return this . conversionService . convert ( source , sourceType , targetType ) ; } public String toString ( ) { } @ SuppressWarnings ( "unchecked" ) private Class < ? extends Annotation > resolveAnnotationType ( AnnotationFormatterFactory < ? > annotationFormatterFactory ) { } private static class PrinterConverter implements GenericConverter { private TypeDescriptor printerObjectType ; @ SuppressWarnings ( "unchecked" ) private Printer printer ; private ConversionService conversionService ; public PrinterConverter ( Printer < ? > printer , ConversionService conversionService ) { } @ SuppressWarnings ( "unchecked" ) public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { if ( ! ( sourceType . isAssignableTo ( this . printerObjectType ) ) ) { source = this . conversionService . convert ( source , sourceType , this . printerObjectType ) ; } return source != null ? this . printer . print ( source , LocaleContextHolder . getLocale ( ) ) : "" ; } private Class < ? > resolvePrinterObjectType ( Printer < ? > printer ) { } } private static class ParserConverter implements GenericConverter { private Parser < ? > parser ; private ConversionService conversionService ; public ParserConverter ( Parser < ? > parser , ConversionService conversionService ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { String submittedValue = ( ( String ) ( source ) ) ; <START_BUG> if ( submittedValue . isEmpty ( ) ) { <END_BUG> return null ; } Object parsedValue ; try { parsedValue = this . parser . parse ( submittedValue , LocaleContextHolder . getLocale ( ) ) ; } catch ( ParseException e ) { throw new ConversionFailedException ( sourceType , targetType , source , e ) ; } TypeDescriptor parsedObjectType = TypeDescriptor . valueOf ( parsedValue . getClass ( ) ) ; if ( ! ( parsedObjectType . isAssignableTo ( targetType ) ) ) { try { parsedValue = this . conversionService . convert ( parsedValue , parsedObjectType , targetType ) ; } catch ( ConversionFailedException e ) { throw new ConversionFailedException ( sourceType , targetType , source , e ) ; } } return parsedValue ; } } }

Fix:
if ( ( submittedValue == null ) || ( ( submittedValue . length ( ) ) == 0 ) ) {