BAEL-4492: Use the prefered List.toArray() approach (#9831)

This commit is contained in:
kwoyke 2020-08-06 21:23:59 +02:00 committed by GitHub
parent 696d707bd8
commit d821719314
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ public class JavaCollectionConversionUnitTest {
@Test
public final void givenUsingCoreJava_whenListConvertedToArray_thenCorrect() {
final List<Integer> sourceList = Arrays.asList(0, 1, 2, 3, 4, 5);
final Integer[] targetArray = sourceList.toArray(new Integer[sourceList.size()]);
final Integer[] targetArray = sourceList.toArray(new Integer[0]);
}
@Test