-
Bug
-
Resolution: Fixed
-
P3
-
6, 6u4
-
b02
-
generic, x86
-
windows_xp, windows_vista
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2169960 | 7 | Pavel Porvatov | P3 | Closed | Fixed | b46 |
FULL PRODUCT VERSION :
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Our app uses JFileChooser to navigate a variety of non-local file systems (network, FTP, etc) by supplying a FileSystemView object to the chooser.
This worked fine until 1.6.0_04, when a change was made to BasicFileChooserUI.changeDirectory(). The problem occurs when the user opens the chooser and attempts to navigate into one of the displayed folders either by double clicking it, or single-clicking it then clicking the Open button.
The new version of changeDirectory() always calls ShellFolder.getShellFolder(dir) which uses File.getCanonicalFile() to retrieve the canonical path for the file then tests the file to see if it exists. This test is performed using the LOCAL file system and when the test fails it throws an exception and the chooser refuses to navigate into the selected folder. Of course the test fails, because the folder doesn't exist on the LOCAL file system.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
invoke JFileChooser with a FileSystemView that describes a remote file system.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
chooser should allows the user to navigate into a selected subfolder
ACTUAL -
chooser does not change directories
ERROR MESSAGES/STACK TRACES THAT OCCUR :
no error message occurs
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
The only workaround we found was to hard code File.getCanonicalPath() to always return "C:\", this passes the "exists" test and JFileChooser is now permitted to navigate into the folder the user has selected.
Release Regression From : 6u3
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Our app uses JFileChooser to navigate a variety of non-local file systems (network, FTP, etc) by supplying a FileSystemView object to the chooser.
This worked fine until 1.6.0_04, when a change was made to BasicFileChooserUI.changeDirectory(). The problem occurs when the user opens the chooser and attempts to navigate into one of the displayed folders either by double clicking it, or single-clicking it then clicking the Open button.
The new version of changeDirectory() always calls ShellFolder.getShellFolder(dir) which uses File.getCanonicalFile() to retrieve the canonical path for the file then tests the file to see if it exists. This test is performed using the LOCAL file system and when the test fails it throws an exception and the chooser refuses to navigate into the selected folder. Of course the test fails, because the folder doesn't exist on the LOCAL file system.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
invoke JFileChooser with a FileSystemView that describes a remote file system.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
chooser should allows the user to navigate into a selected subfolder
ACTUAL -
chooser does not change directories
ERROR MESSAGES/STACK TRACES THAT OCCUR :
no error message occurs
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
The only workaround we found was to hard code File.getCanonicalPath() to always return "C:\", this passes the "exists" test and JFileChooser is now permitted to navigate into the folder the user has selected.
Release Regression From : 6u3
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.
- backported by
-
JDK-2169960 JFileChooser can no longer navigate non-local file systems.
- Closed
- duplicates
-
JDK-6691325 JFileChooser uses ShellFolder instead of File from FileSystemView
- Closed
-
JDK-6668272 BasicFileChooserUI.java throw FileNotFoundException with set own FileSystemView
- Closed
-
JDK-6724190 BasicFileChooserUI uses ShellFolder
- Closed
- relates to
-
JDK-6560349 REGRESSION :folder having ".lnk" in the name can not be opened by 5.0 and later versions
- Closed