JDK-4533419 : JFileChooser.getSelectedFile returns a non-serializable subclass of java.io.File
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2001-11-30
  • Updated: 2002-06-14
  • Resolved: 2002-03-09
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
1.4.1 hopperFixed
Related Reports
Relates :  
Description
JFileChooser.getSelectedFile may return subclass of java.io.File: 
javax.swing.filechooser.FileSystemView$FileSystemRoot. During serialization 
of this class there is fired exception NotSerializableException, that is
clearly a bug in JDK 1.4.0 JFileChooser implementation.
There may be other subclasses of java.io.File - all of them must be
serializable and preferably deserialize to an instance of java.io.File (or to a fully functional descendant of it).

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: hopper FIXED IN: hopper INTEGRATED IN: hopper VERIFIED IN: hopper-beta
14-06-2004

WORK AROUND The workaround is always to call new java.io.File(chooser.getSelectedFile().getAbsolutePath())
11-06-2004

EVALUATION The inner class FileSystemView.FileSystemRoot was not declared static. ###@###.### 2001-11-30
30-11-2001