Description:
Found in #4023 (comment) and #4023 (comment)
I've added a report output file as otherwise we report to stdout.
And we close the report files afterwards - which is why we close stdout.
We have a outStreamCaptor active, however, the close is delegated to the original stdout stream.
Closing stdout in a unit test is not good for IntelliJ IDEA, as IntelliJ IDEA uses this channel
to communicate test progress etc...
I think we should never close stdout,,, We should use something similar to https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/output/CloseShieldWriter.html
This might be a problem, when PMD is integrated as a library (e.g. just calling PMD.run(...)) and no report file given. Then PMD will write the report to stdout and close it afterwards... and the calling process now has a closed stdout.
Description:
Found in #4023 (comment) and #4023 (comment)
This might be a problem, when PMD is integrated as a library (e.g. just calling
PMD.run(...)) and no report file given. Then PMD will write the report to stdout and close it afterwards... and the calling process now has a closed stdout.