From ad208f9580b8a44acbce9115bf0b2503886eb749 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Fri, 1 Jul 2022 12:23:03 +0200 Subject: [PATCH] using stream to iterate stringarray instead of old for loop --- .../java/net/horizoncode/sysbackup/cli/CLIProcessor.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/horizoncode/sysbackup/cli/CLIProcessor.java b/src/main/java/net/horizoncode/sysbackup/cli/CLIProcessor.java index 6204e1f..fd96853 100644 --- a/src/main/java/net/horizoncode/sysbackup/cli/CLIProcessor.java +++ b/src/main/java/net/horizoncode/sysbackup/cli/CLIProcessor.java @@ -8,6 +8,7 @@ import org.tomlj.TomlParseResult; import java.io.File; import java.io.IOException; +import java.util.Arrays; import java.util.Locale; import java.util.Objects; @@ -25,9 +26,7 @@ public class CLIProcessor { " java -jar sysbackup.jar generateTaskConf magento", " java -jar sysbackup.jar backup magento" }; - for (String u : usage) { - System.out.println(u); - } + Arrays.stream(usage).forEachOrdered(System.out::println); } public void startCLI(String[] args, File executionPath) {