Bug in ShellFolder.

Alan Bateman Alan.Bateman at Sun.COM
Fri Nov 13 01:53:49 PST 2009


Paulo Levi wrote:
> In this thread, i found a bug similar to a strange exception i was
> (not) seeing when overriding writeObject
>
> http://forums.java.net/jive/thread.jspa?threadID=31316&tstart=0
>
> I found that it occurs because of saving files returned by the
> filechooser (extensions of sun.awt.shell.ShellFolder) when trying to
> serialize on a shutdownhook,
> because serializing triggers some file operation that needs to send a
> task to a Executor that is already closed.
> I avoid it by:
> out.writeObject(new File(((File) first).getAbsolutePath()));
> Couldn't something equivalent be done in writeReplace be used for the
> same thing inside one of those classes?
>   
Sorry, I can't help you here - I would suggest bringing it up on one of 
the Swing forums or mailing lists.

-Alan.


More information about the nio-discuss mailing list