Prefer ArrayList for Collection when source is an array

Closes gh-28048
This commit is contained in:
Juergen Hoeller
2023-07-05 20:23:17 +02:00
parent 47e631d5ff
commit 0c8d3e70cf
2 changed files with 13 additions and 3 deletions

View File

@@ -343,7 +343,7 @@ class DefaultConversionServiceTests {
@Test
void convertArrayToCollectionInterface() {
Collection<?> result = conversionService.convert(new String[] {"1", "2", "3"}, Collection.class);
assertThat(result).isEqualTo(Set.of("1", "2", "3"));
assertThat(result).isEqualTo(List.of("1", "2", "3"));
}
@Test