This is a second take on fixing JDK-8002307.

The previous discussions are accessible as
* http://mail.openjdk.java.net/pipermail/jmx-dev/2013-May/000225.html
* http://mail.openjdk.java.net/pipermail/jmx-dev/2013-July/000280.html
* http://mail.openjdk.java.net/pipermail/jmx-dev/2013-September/000346.html

The fix assures the immutability by cloning the provided arrays in the
constructor and then cloning them again in the getters.

The constructors are fixed in the javax/management/MBeanInfo.java and
the arrays used in getters are cloned using an already existing
functionality in the same class.

javax/management/modelmbean/ModelMBeanInfoSupport.java is modified to take advantage of extending javax/management/MBeanInfo.java and not to store duplicate information (attributes/operations/constructors/notifications arrays). The deserialization routine is adjusted to reflect this and also to enforce data consistency and backward compatibility.

Regtests and JCK tests were run successfully.

http://cr.openjdk.java.net/~jbachorik/8002307/webrev.05

Thanks,

-JB-

Reply via email to