RFR: JDK-8265078: jpackage tests on Windows leave large temp files [v2]

Alexey Semenyuk asemenyuk at openjdk.java.net
Wed Apr 14 17:39:38 UTC 2021


On Tue, 13 Apr 2021 21:10:56 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

> Are you sure you need an `AtomicReference` to set the exception? I don't see any use of multiple threads, but I might be missing something. If you do need it, you need to fix the order of arguments.

`postVisitDirectory()` and `visitFile()` methods can be potentially called concurrently by `walkFileTree()`. Javadoc https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Files.html#walkFileTree(java.nio.file.Path,java.util.Set,int,java.nio.file.FileVisitor) doesn't say anything about synchronization, so I think it is fair to assume it is not guaranteed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3473


More information about the core-libs-dev mailing list