[PATCH] JDK-6783290: MBeanInfo/MBeanFeatureInfo has inconsistent readObject/writeObject

dmitry.samersoff at oracle.com dmitry.samersoff at oracle.com
Wed Oct 10 03:17:59 PDT 2012


I'll sponsor the fix and will review it  later today.

-Dmitry



-----Original Message-----
From: Jaroslav Bachorik <jaroslav.bachorik at oracle.com>
To: jmx-dev at openjdk.java.net, serviceability-dev at openjdk.java.net
Sent: Wed, 10 Oct 2012 12:48
Subject: [PATCH] JDK-6783290: MBeanInfo/MBeanFeatureInfo has inconsistent readObject/writeObject

I am looking for a review and a sponsor for this fix.

The issue is about an empty array of descriptors being written as a part
of the serialization process but not read when deserializing an
MBeanInfo/MBeanFeatureInfo instance. While the current ObjectInputStream
skips all unread custom written fields it is not a behaviour required by
the specification and may cause problems.

The patch makes the array to be read in all cases - even when it is
known to be an empty one. That way all that has been written as a part
of serialization is read back.

The webrev with the fix and test is available @
https://github.com/jbachorik/openjdk-patches/tree/master/webrevs/JDK-6783290

-JB-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20121010/b21206f7/attachment.html 


More information about the serviceability-dev mailing list