Skip to content

Commit bb832d4

Browse files
author
Vincent Potucek
committed
try can use automatic resource management
1 parent dfd601f commit bb832d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/CommonsCliOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,9 @@ public void displayHelp(String command, Consumer<String> pw) {
486486
System.lineSeparator(),
487487
false);
488488
}
489-
Arrays.stream(sw.toString().split(System.lineSeparator())).forEach(pw);
489+
for (String s : sw.toString().split(System.lineSeparator())) {
490+
pw.accept(s);
491+
}
490492
}
491493

492494
protected String commandLineSyntax(String command) {

0 commit comments

Comments
 (0)