adapted to Converter signature change
This commit is contained in:
parent
6f2642f2d3
commit
9ef1d2b1ad
|
|
@ -833,10 +833,15 @@ public final class DefaultListableBeanFactoryTests {
|
|||
DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
|
||||
DefaultConversionService conversionService = new DefaultConversionService();
|
||||
conversionService.addConverter(new Converter<String, Float>() {
|
||||
public Float convert(String source) throws Exception {
|
||||
public Float convert(String source) {
|
||||
try {
|
||||
NumberFormat nf = NumberFormat.getInstance(Locale.GERMAN);
|
||||
return nf.parse(source).floatValue();
|
||||
}
|
||||
catch (ParseException ex) {
|
||||
throw new IllegalArgumentException(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
lbf.setConversionService(conversionService);
|
||||
MutablePropertyValues pvs = new MutablePropertyValues();
|
||||
|
|
|
|||
Loading…
Reference in New Issue