mariofusco commented on code in PR #5675:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5675#discussion_r1479591510


##########
drools-util/src/main/java/org/drools/util/RemoveCommentsMain.java:
##########
@@ -21,7 +28,11 @@ static String removeComments(String fileName) {
         try (var lines = Files.lines(Path.of(fileName))) {
             return lines.filter(line -> 
!line.startsWith("#")).collect(Collectors.joining("\n"));
         } catch (IOException e) {
-            throw new RuntimeException(e);
+            // Ignore non-existant files.
+            if (!(e instanceof NoSuchFileException)) {

Review Comment:
   Is it necessary to duplicate this check? Isn't one of the 2 just enough?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to