mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 14:09:25 +00:00
added null handling, fixed bug relating to conversion of non-generic collections
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2151 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+3
@@ -81,6 +81,9 @@ public class FormattingConversionServiceAdapter extends GenericConversionService
|
||||
}
|
||||
|
||||
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return this.formatter.parse((String) source, LocaleContextHolder.getLocale());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user