RFR: 8293792: runtime/Dictionary/ProtectionDomainCacheTest.java fails with FileAlreadyExistsException: /tmp

Alan Bateman alanb at openjdk.org
Thu Sep 22 07:45:28 UTC 2022


On Thu, 22 Sep 2022 06:34:53 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this change which proposes to fix the issue noted in https://bugs.openjdk.org/browse/JDK-8293792?
> 
> As discussed in a related PR https://github.com/openjdk/jdk/pull/10266#issuecomment-1246800456, this is a genuine bug in the `java.nio.file.Files.createDirectories` implementation. The commit in this PR fixes that by making sure that links are followed when checking if a `Path` is a directory during the creation of directories in the `createDirectories` implementation. The `private` method which is changed in this PR is only used in the `Files.createDirectories` and no other place, so this change should not impact any other code. Additionally a new test has been added to reproduce the issue and verify the fix.
> tier1, tier2 and tier3 tests passed with this change.

I think create a new issue for Files.createDirectories issue or else move the existing issue from hotspot/runtime and change the description.

I plan to review this change but not today because it require digging into some security issues.

For the test then I think it will mean moving the existing tests from Misc.java to the new source file. That will fit with the description that you propose for the new test.

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

PR: https://git.openjdk.org/jdk/pull/10383


More information about the nio-dev mailing list