Skip to content

Commit

Permalink
Use Stream.toList()
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Nov 28, 2024
1 parent 9f0bb94 commit f1a83f4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.openrewrite.java.tree.Statement;

import java.util.List;
import static java.util.stream.Collectors.toList;

public class JavaToCsharp {

Expand All @@ -41,7 +40,7 @@ public static Cs.CompilationUnit compilationUnit(J.CompilationUnit cu) {
cu.getClasses().stream()
.map(Statement.class::cast)
.map(JRightPadded::build)
.collect(toList()),
.toList(),
cu.getEof());
}
}

0 comments on commit f1a83f4

Please sign in to comment.