JDK-6180936 : REGRESSION: JFileChooser not resolves NetworkNeighbourhood Links in 1.5.0
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-10-19
  • Updated: 2010-04-02
  • Resolved: 2005-08-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u5Fixed 6 b46Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
1.5.0

ADDITIONAL OS VERSION INFORMATION :
WindowsXP pro sp1

A DESCRIPTION OF THE PROBLEM :
JFileChooser
   selectionMode: DIRECTORIES_ONLY
JFileChooser not resolves NetworkNeighbourhood Links in 1.5.0
and resolves in 1.4.2

In mode: DIRECTORIES_AND_FILES
in 1.4.2 and 1.5.0
JFileChooser not resolves NetworkNeighbourhood Links and
not allow select drives ('C:\', 'D:\' etc.)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
JFileChooser
   selectionMode: DIRECTORIES_ONLY
JFileChooser not resolves NetworkNeighbourhood Links in 1.5.0
and resolves in 1.4.2

In mode: DIRECTORIES_AND_FILES
in 1.4.2 and 1.5.0
JFileChooser not resolves NetworkNeighbourhood Links and
not allow select drives ('C:\', 'D:\' etc.)


REPRODUCIBILITY :
This bug can be reproduced always.

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.
###@###.### 10/19/04 00:09 GMT

Cu reports this issue on the following platforms as well:

Windows 2000 SP4 (Professional and Server), Windows XP SP1 and SP2 and Windows 2003 Server.
###@###.### 2005-06-09 18:50:46 GMT

Comments
SUGGESTED FIX Win32ShellFolder2.java: *************** *** 538,546 **** public File[] listFiles(boolean includeHiddenFiles) { if (!isDirectory()) { return null; } ! if (isLink()) { return new File[0]; } Win32ShellFolder2 desktop = Win32ShellFolderManager2.getDesktop(); --- 538,549 ---- public File[] listFiles(boolean includeHiddenFiles) { if (!isDirectory()) { return null; } ! // Links to directories are not directories and cannot be parents. ! // This does not apply to folders in My Network Places (NetHood) ! // because they are both links and real directories! ! if (isLink() && !hasAttribute(ATTRIB_FOLDER)) { return new File[0]; } Win32ShellFolder2 desktop = Win32ShellFolderManager2.getDesktop(); ###@###.### 2005-06-21 20:53:55 GMT
21-06-2005

EVALUATION There are two separate problems mentioned here. 1. "Can not select drives ('C:\', 'D:\' etc.)" is a duplicate of bug 5091302. 2. "Does not resolve NetworkNeighbourhood Links" is a duplicate of bug 5102604. ###@###.### 2005-06-20 18:52:59 GMT ----------- Correction. This is not a duplicate of 5102604. That bug relates to choosing folders in DIRECTORIES_ONLY mode. This bug is about navigating into folders. This is a regression in 5.0, caused by the fix for 4356160. ###@###.### 2005-06-21 20:52:02 GMT The class sun.awt.shell.Win32ShellFolder2 has a test in the method listFiles() to return an empty list for links to directories. These links should act like directories but can't be parents. The problem arises when travesring a folder in "My Network Places" (a.k.a NetHood) where the network folders are actually real directories, but act like links. The fix is to only return an empty list for links that are not also folders. ###@###.### 2005-06-21 20:54:40 GMT
20-06-2005