@@ -116,7 +116,6 @@ static class BeanFactoryAwarePropertyValueConverterFactory implements PropertyVa
116
116
}
117
117
118
118
@ Override
119
- @ SuppressWarnings ("unchecked" )
120
119
public <DV , SV , C extends ValueConversionContext <?>> @ Nullable PropertyValueConverter <DV , SV , C > getConverter (
121
120
Class <? extends PropertyValueConverter <DV , SV , C >> converterType ) {
122
121
@@ -125,8 +124,7 @@ static class BeanFactoryAwarePropertyValueConverterFactory implements PropertyVa
125
124
PropertyValueConverter <DV , SV , C > converter = beanFactory .getBeanProvider (converterType ).getIfAvailable ();
126
125
127
126
if (converter == null && beanFactory instanceof AutowireCapableBeanFactory ) {
128
- return (PropertyValueConverter <DV , SV , C >) ((AutowireCapableBeanFactory ) beanFactory ).createBean (converterType ,
129
- AutowireCapableBeanFactory .AUTOWIRE_CONSTRUCTOR , false );
127
+ return ((AutowireCapableBeanFactory ) beanFactory ).createBean (converterType );
130
128
}
131
129
132
130
return converter ;
@@ -227,8 +225,7 @@ static class Cache {
227
225
228
226
@ Contract ("_, null -> null;_, !null -> !null" )
229
227
<S , T , C extends ValueConversionContext <?>> @ Nullable PropertyValueConverter <S , T , C > cache (
230
- PersistentProperty <?> property ,
231
- @ Nullable PropertyValueConverter <S , T , C > converter ) {
228
+ PersistentProperty <?> property , @ Nullable PropertyValueConverter <S , T , C > converter ) {
232
229
233
230
perPropertyCache .putIfAbsent (property , Optional .ofNullable (converter ));
234
231
0 commit comments