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