@@ -116,7 +116,6 @@ final class PropertyValueConverterFactories {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <DV, SV, C extends ValueConversionContext<?>> @Nullable PropertyValueConverter<DV, SV, C> getConverter(
|
||||
Class<? extends PropertyValueConverter<DV, SV, C>> converterType) {
|
||||
|
||||
@@ -125,8 +124,7 @@ final class PropertyValueConverterFactories {
|
||||
PropertyValueConverter<DV, SV, C> converter = beanFactory.getBeanProvider(converterType).getIfAvailable();
|
||||
|
||||
if (converter == null && beanFactory instanceof AutowireCapableBeanFactory) {
|
||||
return (PropertyValueConverter<DV, SV, C>) ((AutowireCapableBeanFactory) beanFactory).createBean(converterType,
|
||||
AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR, false);
|
||||
return ((AutowireCapableBeanFactory) beanFactory).createBean(converterType);
|
||||
}
|
||||
|
||||
return converter;
|
||||
@@ -227,8 +225,7 @@ final class PropertyValueConverterFactories {
|
||||
|
||||
@Contract("_, null -> null;_, !null -> !null")
|
||||
<S, T, C extends ValueConversionContext<?>> @Nullable PropertyValueConverter<S, T, C> cache(
|
||||
PersistentProperty<?> property,
|
||||
@Nullable PropertyValueConverter<S, T, C> converter) {
|
||||
PersistentProperty<?> property, @Nullable PropertyValueConverter<S, T, C> converter) {
|
||||
|
||||
perPropertyCache.putIfAbsent(property, Optional.ofNullable(converter));
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ public interface TypeScanner {
|
||||
* @return new instance of {@link TypeScanner}.
|
||||
* @see #forTypesAnnotatedWith(Collection)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
default TypeScanner forTypesAnnotatedWith(Class<? extends Annotation>... annotations) {
|
||||
return forTypesAnnotatedWith(Arrays.asList(annotations));
|
||||
}
|
||||
@@ -114,7 +115,7 @@ public interface TypeScanner {
|
||||
* Define what happens in the case of a {@link ClassNotFoundException}.
|
||||
*
|
||||
* @param action must not be {@literal null}.
|
||||
* @return
|
||||
* @return new instance of {@link TypeScanner}.
|
||||
*/
|
||||
TypeScanner onClassNotFound(Consumer<ClassNotFoundException> action);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user