提交 ee8efe9a 编写于 作者: D dsamersoff

6783290: MBeanInfo/MBeanFeatureInfo has inconsistent readObject/writeObject

Summary: call readObject in all cases
Reviewed-by: emcmanus
Contributed-by: jaroslav.bachorik@oracle.com
上级 cc44fb7f
......@@ -239,12 +239,10 @@ public class MBeanFeatureInfo implements Serializable, DescriptorRead {
case 1:
final String[] names = (String[])in.readObject();
if (names.length == 0) {
descriptor = ImmutableDescriptor.EMPTY_DESCRIPTOR;
} else {
final Object[] values = (Object[])in.readObject();
descriptor = new ImmutableDescriptor(names, values);
}
final Object[] values = (Object[]) in.readObject();
descriptor = (names.length == 0) ?
ImmutableDescriptor.EMPTY_DESCRIPTOR :
new ImmutableDescriptor(names, values);
break;
case 0:
......
......@@ -704,12 +704,10 @@ public class MBeanInfo implements Cloneable, Serializable, DescriptorRead {
case 1:
final String[] names = (String[])in.readObject();
if (names.length == 0) {
descriptor = ImmutableDescriptor.EMPTY_DESCRIPTOR;
} else {
final Object[] values = (Object[])in.readObject();
descriptor = new ImmutableDescriptor(names, values);
}
final Object[] values = (Object[]) in.readObject();
descriptor = (names.length == 0) ?
ImmutableDescriptor.EMPTY_DESCRIPTOR :
new ImmutableDescriptor(names, values);
break;
case 0:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册