-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0
-
beta3
-
sparc
-
solaris_2.6
-
Verified
> >| I just got a bug report, 4337793, complaining about
> >| misleading serialization documentation for the
> >| java.security.cert.Certificate class. This class uses
> >| the writeReplace() method to cause a CertificateRep class
> >| to be written out instead. CertificateRep is a
> >| non-public static inner class.
> >|
> >| I read the serialization spec at section 1.6 but it
> >| didn't give any advice about how to handle writeReplace()
> >| situations when documenting a classes serialization form.
> >| Is there anything else written up about this or
> >| other examples of this in the JDK I should look at?
> >|
> >| Any advice?
> >|
> >|
> >| The serialization spec section is at:
> >| http://webmirror.eng/j2se/1.3/docs/guide/serialization/spec/serial-arch.doc6.htm
> >| l#5251
> >|
> >|
> >| Thanks!
> >| Jeff
> To: "Doug Kramer", "Jeff Nisewanger"
> Cc: <###@###.###>, <###@###.###>,
<###@###.###>, <###@###.###>
> Subject: Re: serialized form for classes which use writeReplace()?
>
> Doug,
>
> I haven't thought about this before, but I believe that classes that use
> writeReplace or readResolve must document this usage as part of their serial
> form documentaion. Shouldn't this be possible by using the @serialData tag
> in conjunction with a writeReplace or readResolve method (in much the same
> way that it is used in conjunction with a writeObject method)?
>
> I doubt that we're doing this properly in any of the (few) circumstances
> where we use writeReplace and readResolve, but we should!
>
> Josh
From: Naveen Sanjeeva <###@###.###>
Subject: Re: serialized form for classes which use writeReplace()?
To: ###@###.###, ###@###.###, ###@###.###
Cc: ###@###.###, ###@###.###, ###@###.###, ###@###.###
Even though the serialization spec does not mention the use of the @serialdata
tag with writeReplace()/readResolve(), I agree that it is a good idea to
use it with these methods. The spec needs to be updated. Also I am not sure
if this means updating the Standard doclet to generate new additional output.
Naveen
> >| misleading serialization documentation for the
> >| java.security.cert.Certificate class. This class uses
> >| the writeReplace() method to cause a CertificateRep class
> >| to be written out instead. CertificateRep is a
> >| non-public static inner class.
> >|
> >| I read the serialization spec at section 1.6 but it
> >| didn't give any advice about how to handle writeReplace()
> >| situations when documenting a classes serialization form.
> >| Is there anything else written up about this or
> >| other examples of this in the JDK I should look at?
> >|
> >| Any advice?
> >|
> >|
> >| The serialization spec section is at:
> >| http://webmirror.eng/j2se/1.3/docs/guide/serialization/spec/serial-arch.doc6.htm
> >| l#5251
> >|
> >|
> >| Thanks!
> >| Jeff
> To: "Doug Kramer", "Jeff Nisewanger"
> Cc: <###@###.###>, <###@###.###>,
<###@###.###>, <###@###.###>
> Subject: Re: serialized form for classes which use writeReplace()?
>
> Doug,
>
> I haven't thought about this before, but I believe that classes that use
> writeReplace or readResolve must document this usage as part of their serial
> form documentaion. Shouldn't this be possible by using the @serialData tag
> in conjunction with a writeReplace or readResolve method (in much the same
> way that it is used in conjunction with a writeObject method)?
>
> I doubt that we're doing this properly in any of the (few) circumstances
> where we use writeReplace and readResolve, but we should!
>
> Josh
From: Naveen Sanjeeva <###@###.###>
Subject: Re: serialized form for classes which use writeReplace()?
To: ###@###.###, ###@###.###, ###@###.###
Cc: ###@###.###, ###@###.###, ###@###.###, ###@###.###
Even though the serialization spec does not mention the use of the @serialdata
tag with writeReplace()/readResolve(), I agree that it is a good idea to
use it with these methods. The spec needs to be updated. Also I am not sure
if this means updating the Standard doclet to generate new additional output.
Naveen