jbonofre commented on code in PR #161:
URL: https://github.com/apache/creadur-rat/pull/161#discussion_r1378419481


##########
apache-rat-core/src/main/java/org/apache/rat/Report.java:
##########
@@ -349,29 +357,20 @@ private Report() {
      * @return the IReportale instance containing the files.
      */
     private static IReportable getDirectory(String baseDirectory, 
ReportConfiguration config) {
-        try (PrintStream out = new PrintStream(config.getOutput().get())) {
-            File base = new File(baseDirectory);
-            if (!base.exists()) {
-                out.print("ERROR: ");
-                out.print(baseDirectory);
-                out.print(" does not exist.\n");
-                return null;
-            }
+        File base = new File(baseDirectory);

Review Comment:
   @Claudenw is it already merged on `master` ? I tested on `master` and, even 
if it should with `out` is `null`, and nothing is printed on `System.out` using 
CLI. If I remove the lines in this change, it works. So I'm pretty sure that 
this part is wrong and the `Writer` is not closed cleanly.
   
   For instance:
   
   ```
   $ java -jar apache-rat-0.16-SNAPSHOT.jar /Users/jbonofre/mytest
   $
   ```
   
   So nothing is printed on `System.out` whereas it shoul.
   
   It's a bug for me, fixed with my change.



-- 
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: dev-unsubscr...@creadur.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to