JDK-5055740 : REGRESSION: JFileChooser: pif files show up as dirs and cause InternalError
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2004-06-01
  • Updated: 2004-06-22
  • Resolved: 2004-06-22
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
5.0 b57Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description

Name: gm110360			Date: 06/01/2004


FULL PRODUCT VERSION :
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
PIF files show upas directories in a JFileChooser. Attempting to
navigate to one causes an InternalError to be thrown.

REGRESSION.  Last worked in version tiger-beta

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run code. Navigate to directory containing a PIF file. Double click on
PIF file.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expect the PIF file to show up as a file.
ACTUAL -
PIF file shows up as a directory. Double clicking on the PIF file causes
an InternalError to be thrown.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "Basic L&F File Loading Thread" java.lang.InternalError: Unable to bind C:\WINDOWS\_DEFAULT.PIF to parent
	at sun.awt.shell.Win32ShellFolder2.getIShellFolder(Unknown Source)
	at sun.awt.shell.Win32ShellFolder2.listFiles(Unknown Source)
	at javax.swing.filechooser.FileSystemView.getFiles(Unknown Source)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(Unknown Source)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
   import javax.swing.JFileChooser;
     
    public class FileBug4 {
       public static void main(String[] args) {
         JFileChooser fc = new JFileChooser();
         fc.showOpenDialog(null);
      }
   }
---------- END SOURCE ----------
(Incident Review ID: 275420) 
======================================================================

From duplicate bug 5056422: The listFiles() method when called on shortcuts
to folders throws InternalError.
###@###.### 2004-06-04

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-rc FIXED IN: tiger-rc INTEGRATED IN: tiger-b57 tiger-rc
25-06-2004

EVALUATION The method isDirectory() should return true for shortcuts that end with ".lnk" and that point to directories. ###@###.### 2004-06-02 The listFiles() method will return an empty array for shortcuts to folders. This method is not called on shortcuts by JFileChooser code, but may be called by application overriding JFileChooser methods. See description for duplicate bug 5056422. ###@###.### 2004-06-04
04-06-2004