jmx-dev RFR: 8002307 javax.management.modelmbean.ModelMBeanInfoSupport may expose internal representation by storing an externally mutable object
shanliang
shanliang.jiang at oracle.com
Tue May 28 07:55:18 PDT 2013
Jaroslav,
The fix is OK for me.
The class MBeanInfo could be simplified because the constructors ensure
that attributes, constructors, operations and notifications are not
null, then we can remove all those nonNullxxx methods.
Shanliang
Jaroslav Bachorik wrote:
> Please, review the fix for JDK-8002307.
>
> 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.
>
> http://cr.openjdk.java.net/~jbachorik/8002307/webrev.01
>
> Thanks,
>
> -JB-
>
More information about the jmx-dev
mailing list