8026344: j.u.c.a *Adder and *Accumulator extend a package private class that is Serializable
Martin Buchholz
martinrb at google.com
Wed Oct 23 15:24:15 UTC 2013
Sure are a lot of folks working on java.util.concurrent all of a sudden!
Welcome to the club!
I fixed up some whitespace in jsr166 CVS.
On Wed, Oct 23, 2013 at 7:06 AM, Alan Bateman <Alan.Bateman at oracle.com>wrote:
>
> j.u.c.atomic.{Double,Long}.{**Accumulator,Adder} extend a package-private
> class Striped64 that does striping on 64-bit values. This super type is
> Serializable by way of extending Number. Striped64 doesn't contribute any
> serial fields but its name does leak into the serial stream because there
> is a descriptor for the super type when it is also serializable. Those that
> write conformance tests have noticed this.
>
> In practical terms this is a bit of a non-issue but the reference to
> Striped64 can be removed from the serial stream by changing these four to
> use a serialization proxy. Doug has gone ahead and changed the classes in
> jsr166 CVS and we need to bring these changes into jdk8/tl by the ZBB date.
>
> The webrev with the proposed changes is here:
>
> http://cr.openjdk.java.net/~**alanb/8026344/webrev/<http://cr.openjdk.java.net/~alanb/8026344/webrev/>
>
> A minor difference with what is currently in the CVS is that I've added a
> link in the writeReplace javadoc to the proxy class. I've also added a
> simple test as I didn't find any tests in the jdk repository that exercise
> serialization of these classes.
>
> -Alan.
>
>
More information about the core-libs-dev
mailing list