[11u]: RFR 8227650: EnumSet.class serialization broken in JDK 9+

Peter Levart peter.levart at gmail.com
Sat Jul 13 16:09:07 UTC 2019


Hi,

This is a review request for JDK-8227368 [1] originally applied to JDK 
13, to be backported to JDK 11 update release, tracked by JDK-8227650 [2].

The proposed patch is unchanged at first [3], but since the original 
patch required CSR [4], it might be necessary to change it a bit for JDK 
11 update release. Changes introduced in JDK 9 timeframe broke 
serialization of EnumSet.class (java.lang.Class<EnumSet>) objects, so 
this patch is trying to bring back the compatibility across all 
currently maintained releases (JDK 8, JDK 11 u, JDK 13). There will be 
no backport to JDK 8 u, since we are restoring the behavior of that 
release. Nevertheless this is a change to the serialization format and 
the published specification of it (serialized-form.html), so I'm asking 
if this is allowed in an update release. If the published specification 
matters, the patch could be tweaked so that the published 
serialized-form.html wouldn't change, only the behavior would. But this 
sounds like cheating. Please advise.

Regards, Peter

[1] https://bugs.openjdk.java.net/browse/JDK-8227368
[2] https://bugs.openjdk.java.net/browse/JDK-8227650
[3] 
http://cr.openjdk.java.net/~plevart/jdk11u-dev/8227650_EnumSet.class_serialization/webrev.01/
[4] https://bugs.openjdk.java.net/browse/JDK-8227432



More information about the jdk-updates-dev mailing list