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

Paul Hohensee phh at openjdk.org
Wed Apr 2 16:06:54 UTC 2025


On Tue, 4 Mar 2025 09:07:51 GMT, Taizo Kurashige <duke at openjdk.org> wrote:

> 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.

Not a Windows expert, but looks reasonable.

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

Marked as reviewed by phh (Reviewer).

PR Review: https://git.openjdk.org/jdk21u-dev/pull/1445#pullrequestreview-2736851196


More information about the jdk-updates-dev mailing list