shiro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan <>
Subject SimpleSession serialization
Date Fri, 23 Sep 2011 23:19:51 GMT
Hi --

In the writeObject() method of SimpleSession is a call to
out.defaultWriteObject() before each field is written out.  This call to
defaultWriteObject() was causing exceptions for me (non-serializable, can't
serialize WeakHashMap) so it got me thinking...

My understanding is that defaultWriteObject() writes out the non-transient
fields, and is used if a class doesn't explicitly have its own writeObject()
method.  Since writeObject() specifies exactly which fields to serialize, I
don't think this call is useful ... in fact, it would just make the
serialized stream bigger.

I took it out of my code and saw no ill effect from it.


View this message in context:
Sent from the Shiro User mailing list archive at

View raw message