<CONTEXT></BUG>private final Formatter formatter;public FormattingConverter(Formatter formatter) {this.formatter = formatter;}<extra_id_0>private final Formatter formatter;public FormattingConverter(Formatter formatter) {this.formatter = formatter;}<BUG>public Object convert(String source) {try {return this.formatter.parse(source, LocaleContextHolder.getLocale());}catch (ParseException ex) {</BUG>throw new IllegalArgumentException("Could not convert formatted value '" + source + "'", ex);</CONTEXT>
Formatter formatter = this.formatterRegistry.getFormatter(targetType);if (formatter != null) {return new FormattingConverter(formatter);return super.getConverter(sourceType, targetType);private static class FormattingConverter implements GenericConverter {