[11u]: RFR 8227650: EnumSet.class serialization broken in JDK 9+
Peter Levart
peter.levart at gmail.com
Wed Jul 17 09:23:21 UTC 2019
Hi Stuart,
On 7/16/19 8:09 PM, Stuart Marks wrote:
>
> doing something like the following in order to avoid changing
> serialized-form.html:
>
> private static final long serialVersionUID; static { serialVersionUID
> = 1009687484059888093L; }
>
> Indeed, this avoids changing serialized-form.html. However, there's
> still a problem. I ran JCK 11 with this patch applied to my JDK 11
> build, and the result is that the api/serializabletypes test failed.
> So, cheating or sleazy hack, this approach doesn't really work.
> Although this technique avoids changing the /text/ of the
> specification output, it really is changing the specification, as far
> as the JCK is concerned.
>
It would be interesting to know what the api/serializabletypes JCK 11
test does. Why does it fail when svuid field is introduced?
Otherwise, your "sleazy hacks" to fabricate the correct (as of JDK 8)
computed svuid seem OK. The only gripe is that should any further
changes to EnumSet be necessary in JDK 11 u, they would have to be
carefully constructed to not break the serialization again. At least
there is a test for that now :-)
Regards, Peter
More information about the jdk-updates-dev
mailing list