[jdk21u-dev] RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive

Taizo Kurashige duke at openjdk.org
Tue Mar 4 09:13:26 UTC 2025


Hi all,

This is a backport of JDK-8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive

Original patch does not apply cleanly.
GetXSpace.java in jdk21 includes tests when the SecurityManager is enabled.
When testing using class DenyFSA, the df command executed in getCDDriveSpace occurs  java.security.AccessControlException. To prevent this, I modified testVolumes() to change the timing of the SecurityManager set.

Testing: java/io/File/GetXSpace.java on Windows Server 2019 where drive C is a normal local disk, drive D is an unmounted iso CD-ROM drive, and drive F is an iso mounted CD-ROM drive

Thanks.

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

Commit messages:
 - fix testVolumes() for readability and efficiency
 - Merge branch 'openjdk:master' into fix_GetXSpace_bug
 - Backport 40f0a398fa9b1b39a43640973eaffb041bb7b63d and fix testVolumes()

Changes: https://git.openjdk.org/jdk21u-dev/pull/1445/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=1445&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8343342
  Stats: 94 lines in 2 files changed: 78 ins; 4 del; 12 mod
  Patch: https://git.openjdk.org/jdk21u-dev/pull/1445.diff
  Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/1445/head:pull/1445

PR: https://git.openjdk.org/jdk21u-dev/pull/1445


More information about the jdk-updates-dev mailing list