mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
fixed DataBinder's conversion error handling for direct field access with ConversionService (SPR-6953)
This commit is contained in:
+4
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user