stefanvodita opened a new pull request #809: URL: https://github.com/apache/logging-log4j2/pull/809
A race condition could appear when 2 threads were trying to create the same directory. Both would check that the directory did not exist, then one would create the directory and the other would throw an exception. This was reproduced with a unit test included this commit and fixed by using Files.createDirectories() instead of File.mkdirs(), so that the existence check and directory creation are done as an atomic operation. Note: I didn't manage to run the tests with Maven, but I ran the tests in FileUtilsTest from IntelliJ. I'll come back to this when I have more time. -- 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]
