You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by ma...@apache.org on 2024/01/27 17:24:11 UTC

(incubator-kie-drools) branch main updated: [KIE-859] allow RemoveCommentsMain to process multiple files (#5667)

This is an automated email from the ASF dual-hosted git repository.

mariofusco pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-drools.git


The following commit(s) were added to refs/heads/main by this push:
     new 35949a49d6 [KIE-859] allow RemoveCommentsMain to process multiple files (#5667)
35949a49d6 is described below

commit 35949a49d682d24d7dba297b4b7e7f4f56ef9fca
Author: Mario Fusco <ma...@gmail.com>
AuthorDate: Sat Jan 27 18:24:07 2024 +0100

    [KIE-859] allow RemoveCommentsMain to process multiple files (#5667)
---
 .../src/main/java/org/drools/util/RemoveCommentsMain.java   | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drools-util/src/main/java/org/drools/util/RemoveCommentsMain.java b/drools-util/src/main/java/org/drools/util/RemoveCommentsMain.java
index 7cc1479306..014a1b23bf 100644
--- a/drools-util/src/main/java/org/drools/util/RemoveCommentsMain.java
+++ b/drools-util/src/main/java/org/drools/util/RemoveCommentsMain.java
@@ -7,12 +7,13 @@ import java.util.stream.Collectors;
 
 public class RemoveCommentsMain {
 
-    public static void main(String[] args) {
-        String fileName = args[0];
-        try {
-            Files.write(Path.of(fileName), removeComments(fileName).getBytes());
-        } catch (IOException e) {
-            throw new RuntimeException(e);
+    public static void main(String... args) {
+        for (String fileName : args) {
+            try {
+                Files.write(Path.of(fileName), removeComments(fileName).getBytes());
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org