Skip to content

Commit

Permalink
Merge branch '2.4.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
philwebb committed Jan 30, 2021
2 parents 82b90d5 + dd997cd commit 0174645
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.springframework.core.ResolvableType;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.util.StringUtils;

/**
* Base class for {@link AggregateBinder AggregateBinders} that read a sequential run of
Expand Down Expand Up @@ -90,7 +89,7 @@ private void bindIndexed(ConfigurationPropertySource source, ConfigurationProper

private void bindValue(Bindable<?> target, Collection<Object> collection, ResolvableType aggregateType,
ResolvableType elementType, Object value) {
if (value instanceof String && !StringUtils.hasText((String) value)) {
if (value == null || value instanceof CharSequence && ((CharSequence) value).length() == 0) {
return;
}
Object aggregate = convert(value, aggregateType, target.getAnnotations());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ void convertWhenCanConvertViaToString(ConversionService conversionService) {
@ConversionServiceTest
void convertWhenCanConvertDirectlySkipsStringConversion(ConversionService conversionService) {
assertThat(conversionService.convert(new String("1"), Long.class)).isEqualTo(1);
System.out.println(conversionService.getClass());
if (!ConversionServiceArguments.isApplicationConversionService(conversionService)) {
assertThat(conversionService.convert(new StringBuilder("1"), Long.class)).isEqualTo(2);
}
Expand Down

0 comments on commit 0174645

Please sign in to comment.