fixed DataBinder's conversion error handling for direct field access with ConversionService (SPR-6953)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3163 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller
2010-03-24 17:40:45 +00:00
parent 74705a7aea
commit 8c437a8214
4 changed files with 99 additions and 7 deletions
@@ -495,7 +495,11 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
* property values, as an alternative to JavaBeans PropertyEditors.
*/
public void setConversionService(ConversionService conversionService) {
Assert.state(this.conversionService == null, "DataBinder is already initialized with ConversionService");
this.conversionService = conversionService;
if (this.bindingResult != null && conversionService != null) {
this.bindingResult.initConversion(conversionService);
}
}
/**