RFR: JDK-8192935 Fix EnumSet's SerializationProxy javadoc
martinrb at google.com
Mon Dec 4 22:23:43 UTC 2017
On Mon, Dec 4, 2017 at 1:46 PM, Roger Riggs <Roger.Riggs at oracle.com> wrote:
> If you don't like my alternative, fine; it has its own set of tradeoffs
> that might be net positive or negative. If you want to proceed with the
> current approach, then I won't stand in the way. At the very least there
> should be some boilerplate added to EnumSet that makes it clear that
> EnumSet itself never appears in the serial form.
> I don't disagree, there are many things that could be improved.
I only volunteered to bring EnumSet (as the poster child for the
Serialization Proxy Pattern) into a no-worse state than other classes
implementing the pattern. The doc of the writeReplace and readObject
methods is pretty good implicit documentation that the pattern applies
here. Serialization overall remains as deeply flawed as ever.
I still plan to submit what I have now.
More information about the core-libs-dev