RFR: 8327236: JFileChooser/8194044/FileSystemRootTest.java fails on Windows 11: root drive reported as false

Tejesh R tr at openjdk.org
Wed Sep 17 11:21:55 UTC 2025


On Wed, 17 Sep 2025 08:19:51 GMT, Francesco Andreuzzi <fandreuzzi 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.
>
> test/jdk/javax/swing/JFileChooser/8194044/FileSystemRootTest.java line 39:
> 
>> 37: public class FileSystemRootTest {
>> 38:     public static void main(String[] args) throws Exception {
>> 39:         if (System.getProperty("os.name").equalsIgnoreCase("Windows 11")) {
> 
> I guess the same behavior applies to versions newer than 11, right? If that's the case, perhaps you could check whether `getParentDirectory("C:...\Documents")` returns `C:..\Desktop`.

Whether the same behavior applies to newer versions is unknown. As of now it works for Windows 10 and doesn't work for Windows 11. That the behavior seen in Windows 11 where `FileSysetemView.getParentDirectory(C:/..../Documents)` return "C:/..../Desktop". So this is an observations and I think this particular test cannot handle the scenario, which is why I'm skipping it for only Window 11.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27329#discussion_r2355175822


More information about the client-libs-dev mailing list