Serialization question on java 7

Alan Bateman Alan.Bateman at oracle.com
Wed Dec 28 02:51:04 PST 2011


On 28/12/2011 05:51, Paulo Levi wrote:
> Is it new behavior of ObjectInput/OutputStream to store serialization 
> exceptions and throw them on deserialization?
>
> It's pretty handy. I found that when trying to deserialize a Path 
> instance.
>
> SEVERE: Couldn't read saved object
> java.io.WriteAbortedException: writing aborted; 
> java.io.NotSerializableException: sun.nio.fs.UnixPath
> ....
> Caused by: java.io.NotSerializableException: sun.nio.fs.UnixPath (from 
> previous invocation).
Path is not serializable. Can you explain how you got to this error? I 
would have expected an error when you attempted to serialize it.

-Alan


More information about the nio-discuss mailing list