RFR: 8327236: JFileChooser/8194044/FileSystemRootTest.java fails on Windows 11: root drive reported as false
Tejesh R
tr at openjdk.org
Thu Sep 18 09:22:57 UTC 2025
On Wed, 17 Sep 2025 05:39:26 GMT, Tejesh R <tr at openjdk.org> wrote:
> The logic no longer applies to window 11 since getParentDirectory("C:\...\\Documents") return "C:\..\\Desktop". This will require thorough analysis and might call for a product fix. Hence bypassing this test for Windows 11 OS.
> I don't think it's a product bug. It's Microsoft decision to move around folders in Windows shell namespace. The test expectation could be wrong for other versions of Windows, however, Windows 11 will soon be the only version supported.
>
> Perhaps, the test should be written differently. As far as I understand, the problem with [JDK-8194044](https://bugs.openjdk.org/browse/JDK-8194044) was that the drives had displayed without their names. The test navigates the shell namespace to find the root and then verifies the name isn't empty.
>
> Disabling the test for Windows 11 renders the test _useless_. The regression where disks display no name could be re-introduced.
>
> The fix should modify the test logic so that it is able to navigate to the root of the drive. Alternatively, you can call `FileSystemView.getRoots` and verify that the names of the returned files / folders aren't empty. Then ensure that the updated test reproduces the original issue described in JDK-8194044.
Yes, I agree with modifying the test logic to reproduce and test the original issue described in JDK-8194044.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27329#issuecomment-3306430310
More information about the client-libs-dev
mailing list