No subject


Thu Mar 18 12:11:26 PST 2004


"To allow subtypes of non-serializable classes to be serialized, the subtype
may assume responsibility
for saving and restoring the state of the supertype's public, protected, and
(if accessible) package
fields. The subtype may assume this responsibility only if the class it extends
has an accessible
no-arg constructor to initialize the class's state. It is an error to declare a
class Serializable in this
case. The error will be detected at runtime."

Lirian


Michael Rimov wrote:

> Hey Folks,
>
> AFAICT, setPersistentAttribute() although it takes Object as a parameter,
> it will throw an Exception if the object doesn't implement Serializable....
> so any reason we can't change the method signature to that of:
>
> setPeristentAttribute(String key, Serializable object);  ???
>
> Just something to perhaps catch some potential runtime errors at compile
> time instead??  I can't see any API change in essence.. simply in name?
>
> Comments?
>                                         -MIke
>
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
> http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives: http://mail.jcorporate.com/pipermail/opensource/




More information about the Opensource mailing list