JDK-6550546 : Win LAF: JFileChooser -> Look in Drop down should not display any shortcuts created on desktop
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6,7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp,windows_vista
  • CPU: x86
  • Submitted: 2007-04-26
  • Updated: 2014-04-23
  • Resolved: 2009-11-25
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.
JDK 6 JDK 7
6-poolResolved 7 b77Fixed
Related Reports
Duplicate :  
Description
To reproduce...

- Create a shortcut to a dir on the desktop
- Open the JFileChooser, click Desktop Icon. 
- Just check the 'Look In' drop down
- If the shortcut to the directory created is visible then the bug is reproduced. 

This is not the same in Native filechooser. The shorcuts created are not listed in the drop down. 

If you select that Shortcut through the Drop down, you won't see the contents of those directory.
I tried the same scenario with jdk7 b15 and I observed an exception in the console and it breaks the functionality after exception.

Exception:
==========
Exception occurred during event dispatching:
java.lang.InternalError: Unable to bind C:\Documents and Settings\Raja.Dhanesh\D
esktop\Shortcut to export.lnk to parent
        at sun.awt.shell.Win32ShellFolder2.getIShellFolder(Win32ShellFolder2.jav
a:384)
        at sun.awt.shell.Win32ShellFolder2.getFolderColumns(Win32ShellFolder2.ja
va:966)
        at sun.awt.shell.ShellFolderManager.getFolderColumns(ShellFolderManager.
java:164)
        at sun.awt.shell.Win32ShellFolderManager2.getFolderColumns(Win32ShellFol
derManager2.java:49)
        at sun.awt.shell.ShellFolder.getFolderColumns(ShellFolder.java:359)
        at sun.swing.FilePane$DetailsTableModel.updateColumnInfo(FilePane.java:6
96)
        at sun.swing.FilePane.doDirectoryChanged(FilePane.java:1570)
        at sun.swing.FilePane.propertyChange(FilePane.java:1624)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSup
port.java:357)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSup
port.java:294)
        at java.awt.Component.firePropertyChange(Component.java:7899)
        at javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:586)
        at com.sun.java.swing.plaf.windows.WindowsFileChooserUI$DirectoryComboBo
xAction.actionPerformed(WindowsFileChooserUI.java:1380)
        at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1260)
        at javax.swing.JComboBox.setSelectedItem(JComboBox.java:587)
        at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:623)
        at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicCom
boPopup.java:832)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:2
91)
        at java.awt.Component.processMouseEvent(Component.java:6047)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3288)
        at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicCombo
Popup.java:498)
        at java.awt.Component.processEvent(Component.java:5812)
        at java.awt.Container.processEvent(Container.java:2074)
        at java.awt.Component.dispatchEventImpl(Component.java:4419)
        at java.awt.Container.dispatchEventImpl(Container.java:2132)
        at java.awt.Component.dispatchEvent(Component.java:4249)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4267
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3931)

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3861)
        at java.awt.Container.dispatchEventImpl(Container.java:2118)
        at java.awt.Window.dispatchEventImpl(Window.java:2548)
        at java.awt.Component.dispatchEvent(Component.java:4249)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:615)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:276)

Comments
EVALUATION Shortcuts should be filtered out using the ShellFolder's isLink method.
06-11-2007