mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Consistently use constructor-based instantiation instead of Class.newInstance / BeanUtils.instantiate
Issue: SPR-14486
This commit is contained in:
+1
-1
@@ -218,7 +218,7 @@ public class FormattingConversionServiceTests {
|
||||
assertEquals(new LocalDate(2009, 11, 1), new LocalDate(dates.get(1)));
|
||||
assertEquals(new LocalDate(2009, 11, 2), new LocalDate(dates.get(2)));
|
||||
|
||||
Object model = BeanUtils.instantiate(modelClass);
|
||||
Object model = modelClass.newInstance();
|
||||
ConfigurablePropertyAccessor accessor = directFieldAccess ? PropertyAccessorFactory.forDirectFieldAccess(model) :
|
||||
PropertyAccessorFactory.forBeanPropertyAccess(model);
|
||||
accessor.setConversionService(formattingService);
|
||||
|
||||
Reference in New Issue
Block a user