RFR: JDK-8007373 Inet6Address serialization incompatibility
Chris Hegarty
chris.hegarty at oracle.com
Sun Mar 31 07:16:24 PDT 2013
Thanks for taking this Mark. It was my change that introduced this incompatibility.
The source changes look fine to me. In fact, the removal of scope_ifname_set was not necessary for the original fix, just "bad" clean up. Also, there is no need to reset its default value where declared.
The test needs the usual GPL header. We never call exit from a test, but it looks like this only possible during generation of the static byte arrays.
-Chris
On 26 Mar 2013, at 16:40, Mark Sheppard <mark.sheppard at oracle.com> wrote:
> Hi,
> could you oblige and review the webrev below as a fix for the issue raised in
> JDK8007373, Inet6Address serialization incompatibility
>
> http://cr.openjdk.java.net/~msheppar/8007373/webrev.00/
>
> Description:
> We seem to have changed the serialization of Inet6Address in jdk8 compared with jdk7. It is causing a problem de-serializing instances (in 7) that were serialized by 8. The scope-id is not being recreated correctly.
>
> this is related to JDK-8004675
>
> The fix has re-instated the scope_ifname_set variable, and sets this explicitly during serialization (writeObject). It also
> sets the scope id to 0 when the scope_ifname is determined to be null during deserialization (readObject).
> The refactoring undertaken in 8004675 has been left in place.
>
> It will be noted that an additional issue has been raised, JDK-8010826, arising from testing during this fix.
> the scope id can be incorrect after serialization where a scoped interface in the serialized object does not
> exist on the deserializing host.
>
>
> regards
> Mark
More information about the net-dev
mailing list