ottlinger commented on code in PR #311:
URL: https://github.com/apache/creadur-rat/pull/311#discussion_r1794258996
##########
apache-rat-core/src/main/java/org/apache/rat/ReportConfiguration.java:
##########
@@ -418,7 +444,8 @@ public void setOut(final File file) {
DefaultLog.getInstance().warn("Unable to delete file: " +
file);
}
}
- if (!file.getParentFile().mkdirs()) {
+ File parent = file.getParentFile();
+ if (!parent.mkdirs() && !parent.isDirectory()) {
Review Comment:
When reading this line I stumbled if it can be simplified ....
NOT(a) and NOT(b) == a OR b ?!
But I'm not sure if it is easier to read as
`!parent.mkdirs() && parent.isFile()` .... WDYT?
--
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]