Skip to content

Conversation

TejeshR13
Copy link
Contributor

@TejeshR13 TejeshR13 commented Sep 17, 2025

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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8327236: JFileChooser/8194044/FileSystemRootTest.java fails on Windows 11: root drive reported as false (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27329/head:pull/27329
$ git checkout pull/27329

Update a local copy of the PR:
$ git checkout pull/27329
$ git pull https://git.openjdk.org/jdk.git pull/27329/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27329

View PR using the GUI difftool:
$ git pr show -t 27329

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27329.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 17, 2025

👋 Welcome back tr! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 17, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Sep 17, 2025

@TejeshR13 The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added client [email protected] rfr Pull request is ready for review labels Sep 17, 2025
@mlbridge
Copy link

mlbridge bot commented Sep 17, 2025

Webrevs

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

@aivanov-jdk
Copy link
Member

aivanov-jdk commented Sep 17, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

4 participants