Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all
javax/swing/JTree/4633594/JTreeFocusTest.java 7105441 macosx-all
javax/swing/AbstractButton/6711682/bug6711682.java 8060765 windows-all,macosx-all
javax/swing/JFileChooser/6396844/TwentyThousandTest.java 8198003 generic-all
javax/swing/JFileChooser/8194044/FileSystemRootTest.java 8327236 windows-all
javax/swing/JPopupMenu/6800513/bug6800513.java 7184956 macosx-all
javax/swing/JTabbedPane/4624207/bug4624207.java 8064922 macosx-all
javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java 8160720 generic-all
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -36,6 +36,10 @@

public class FileSystemRootTest {
public static void main(String[] args) throws Exception {
if (System.getProperty("os.name").equalsIgnoreCase("Windows 11")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should assume it does apply to newer versions.
However that is moot, as I don't see much point in continuing to run on the old, nearly out of support Windows 10.
Additionally I strongly suspect that you'll find that Windows Server 2022 and definitely 2025 will have the same behavior and you aren't preventing the test running there.

And if this is fixed, the bug tracking the problem is gone. So you'd just have to file another one and we've artificially hidden the test failure.

So I think this PR should be withdrawn.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll withdraw this PR so that the bug remains open.

System.out.println("Test not applicable for Win 11");
return;
}
FileSystemView fileSystemView = FileSystemView.getFileSystemView();

/*
Expand Down