Skip to content

Commit b6c4636

Browse files
authored
Use Stream#toArray in TestCompiler
Closes gh-25453
1 parent e71f702 commit b6c4636

File tree

1 file changed

+1
-2
lines changed
  • spring-context-indexer/src/test/java/org/springframework/context/index/test

1 file changed

+1
-2
lines changed

spring-context-indexer/src/test/java/org/springframework/context/index/test/TestCompiler.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ public TestCompiler(JavaCompiler compiler, Path tempDir) throws IOException {
6363

6464

6565
public TestCompilationTask getTask(Class<?>... types) {
66-
List<String> names = Arrays.stream(types).map(Class::getName).collect(Collectors.toList());
67-
return getTask(names.toArray(new String[names.size()]));
66+
return getTask(Arrays.stream(types).map(Class::getName).toArray(String[]::new));
6867
}
6968

7069
public TestCompilationTask getTask(String... types) {

0 commit comments

Comments
 (0)