6783290: MBeanInfo/MBeanFeatureInfo has inconsistent readObject/writeObject
Call readObject in all cases Reviewed-by: emcmanus
This commit is contained in:
parent
059b2b67b3
commit
28979bd7a2
@ -239,12 +239,10 @@ public class MBeanFeatureInfo implements Serializable, DescriptorRead {
|
|||||||
case 1:
|
case 1:
|
||||||
final String[] names = (String[])in.readObject();
|
final String[] names = (String[])in.readObject();
|
||||||
|
|
||||||
if (names.length == 0) {
|
final Object[] values = (Object[]) in.readObject();
|
||||||
descriptor = ImmutableDescriptor.EMPTY_DESCRIPTOR;
|
descriptor = (names.length == 0) ?
|
||||||
} else {
|
ImmutableDescriptor.EMPTY_DESCRIPTOR :
|
||||||
final Object[] values = (Object[])in.readObject();
|
new ImmutableDescriptor(names, values);
|
||||||
descriptor = new ImmutableDescriptor(names, values);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -704,12 +704,10 @@ public class MBeanInfo implements Cloneable, Serializable, DescriptorRead {
|
|||||||
case 1:
|
case 1:
|
||||||
final String[] names = (String[])in.readObject();
|
final String[] names = (String[])in.readObject();
|
||||||
|
|
||||||
if (names.length == 0) {
|
final Object[] values = (Object[]) in.readObject();
|
||||||
descriptor = ImmutableDescriptor.EMPTY_DESCRIPTOR;
|
descriptor = (names.length == 0) ?
|
||||||
} else {
|
ImmutableDescriptor.EMPTY_DESCRIPTOR :
|
||||||
final Object[] values = (Object[])in.readObject();
|
new ImmutableDescriptor(names, values);
|
||||||
descriptor = new ImmutableDescriptor(names, values);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user