Skip to content

Commit

Permalink
Revert BindConverter changes that are now handled by Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Jun 14, 2022
1 parent 2f40c52 commit 5d7cab0
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -42,7 +42,6 @@
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.converter.ConditionalGenericConverter;
import org.springframework.core.convert.support.GenericConversionService;
import org.springframework.util.ClassUtils;
import org.springframework.util.CollectionUtils;

/**
Expand Down Expand Up @@ -107,10 +106,7 @@ private Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor
for (ConversionService delegate : this.delegates) {
try {
if (delegate.canConvert(sourceType, targetType)) {
Object converted = delegate.convert(source, sourceType, targetType);
if (ClassUtils.isAssignableValue(targetType.getType(), converted)) {
return converted;
}
return delegate.convert(source, sourceType, targetType);
}
}
catch (ConversionException ex) {
Expand Down

0 comments on commit 5d7cab0

Please sign in to comment.