EnumSet.class serialization broken - twice - JDK-8227368

Stuart Marks stuart.marks at oracle.com
Wed Jul 10 02:32:38 UTC 2019


>> 1. New changeset with constant version of EnumSet.serialVersionUID.
> 
> This is already in the webrev.01 changeset. webrev.02 is an attempt to sneak the change without being visible in the serialized-form.html.

Ah. I skipped webrev.01 because I thought that webrev.02 had superseded it. 
Looking at webrev.01, I see

> +    // value computed from JDK 8 (and previous) EnumSet class
> +    // needed to properly cross-(de)serialize EnumSet.class objects
> +    // between JDK 8- <-> JDK 9+
> +    private static final long serialVersionUID = 1009687484059888093L;
> +

I don't think this comment can cover the entire history here. We'll have to rely 
on the bug report, the CSR, and the email archives.

Most declarations of serialVersionUID don't have a comment at all. So, we could 
just omit it.

If you feel a comment is necessary, perhaps something like

// declare serialization compatibility with JDK 8 (see JDK-8227368)

might be sufficient. Otherwise, webrev.01 looks fine.

> On 7/9/19 1:57 AM, Stuart Marks wrote:
>> 2. Create draft CSR. 
> 
> Created:
> 
> https://bugs.openjdk.java.net/browse/JDK-8227432

I've done some editing on this CSR and I've marked myself as a reviewer. Please 
move this to Finalized.

While we're waiting for the CSR to be approved (I hope this takes only a day or 
two) I'll do some testing with your patch.

Thanks,

s'marks



More information about the core-libs-dev mailing list