Browse Source

Merge branch '1.5.x' into 2.0.x

pull/13161/head
Andy Wilkinson 8 years ago
parent
commit
45f4e8795e
  1. 4
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToCollectionConverterTests.java

4
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToCollectionConverterTests.java

@ -126,12 +126,14 @@ public class DelimitedStringToCollectionConverterTests { @@ -126,12 +126,14 @@ public class DelimitedStringToCollectionConverterTests {
assertThat(converted).containsExactly("a,b,c");
}
@SuppressWarnings("unchecked")
@Test
public void convertWhenHasCollectionObjectTypeShouldUseCollectionObjectType() {
TypeDescriptor sourceType = TypeDescriptor.valueOf(String.class);
TypeDescriptor targetType = TypeDescriptor
.nested(ReflectionUtils.findField(Values.class, "specificType"), 0);
MyCustomList<String> converted = (MyCustomList<String>) this.conversionService.convert("a*b", sourceType, targetType);
MyCustomList<String> converted = (MyCustomList<String>) this.conversionService
.convert("a*b", sourceType, targetType);
assertThat(converted).containsExactly("a", "b");
}

Loading…
Cancel
Save