RFR: 8002307 javax.management.modelmbean.ModelMBeanInfoSupport may expose internal representation by storing an externally mutable object
Peter Allwin
peter.allwin at oracle.com
Tue May 28 08:03:26 PDT 2013
Hi Jaroslav,
Just one comment, should we get rid of the static empty arrays in ModelMBeanInfoSupport.java now that they're not in use?
343 private static final ModelMBeanAttributeInfo[] NO_ATTRIBUTES =
344 new ModelMBeanAttributeInfo[0];
345 private static final ModelMBeanConstructorInfo[] NO_CONSTRUCTORS =
346 new ModelMBeanConstructorInfo[0];
347 private static final ModelMBeanNotificationInfo[] NO_NOTIFICATIONS =
348 new ModelMBeanNotificationInfo[0];
349 private static final ModelMBeanOperationInfo[] NO_OPERATIONS =
350 new ModelMBeanOperationInfo[0];
Other than that it looks good to me!
Thanks!
/peter
----- Original Message -----
From: jaroslav.bachorik at oracle.com
To: serviceability-dev at openjdk.java.net
Sent: Tuesday, May 28, 2013 3:29:17 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: RFR: 8002307 javax.management.modelmbean.ModelMBeanInfoSupport may expose internal representation by storing an externally mutable object
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 serviceability-dev
mailing list