JDK-8023954 : MBean*Info.equals: throw NPE
  • Type: Bug
  • Component: core-svc
  • Sub-Component: javax.management
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-08-29
  • Updated: 2014-02-12
  • Resolved: 2013-09-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u60Fixed 8 b110Fixed
Description
I have a test calling all MBean*Info.equals, it got 13 times NPE:

---Testing on MBeanAttributeInfo...
--->KO-1!!! MBeanAttributeInfo.equals got NPE if null paramer: class name
OK-2: MBeanAttributeInfo.equals worked on a null paramer: class name
OK-3: MBeanAttributeInfo.equals worked on a null paramer: class name
--->KO-1!!! MBeanAttributeInfo.equals got NPE if null paramer: type
OK-2: MBeanAttributeInfo.equals worked on a null paramer: type
OK-3: MBeanAttributeInfo.equals worked on a null paramer: type
--->KO-1!!! MBeanAttributeInfo.equals got NPE if null paramer: description
OK-2: MBeanAttributeInfo.equals worked on a null paramer: description
OK-3: MBeanAttributeInfo.equals worked on a null paramer: description

---Testing on MBeanConstructorInfo...
--->KO-1!!! MBeanConstructorInfo.equals got NPE if null paramer: name
OK-2: MBeanConstructorInfo.equals worked on a null paramer: name
OK-3: MBeanConstructorInfo.equals worked on a null paramer: name
--->KO-1!!! MBeanConstructorInfo.equals got NPE if null paramer: description
OK-2: MBeanConstructorInfo.equals worked on a null paramer: description
OK-3: MBeanConstructorInfo.equals worked on a null paramer: description
OK-1: MBeanConstructorInfo.equals worked on a null paramer: MBeanParameterInfo
OK-2: MBeanConstructorInfo.equals worked on a null paramer: MBeanParameterInfo
OK-3: MBeanConstructorInfo.equals worked on a null paramer: MBeanParameterInfo
OK-1: MBeanConstructorInfo.equals worked on a null paramer: descriptor
OK-2: MBeanConstructorInfo.equals worked on a null paramer: descriptor
OK-3: MBeanConstructorInfo.equals worked on a null paramer: descriptor

---Testing on MBeanOperationInfo...
--->KO-1!!! MBeanOperationInfo.equals got NPE if null paramer: name
OK-2: MBeanOperationInfo.equals worked on a null paramer: name
OK-3: MBeanOperationInfo.equals worked on a null paramer: name
--->KO-1!!! MBeanOperationInfo.equals got NPE if null paramer: description
OK-2: MBeanOperationInfo.equals worked on a null paramer: description
OK-3: MBeanOperationInfo.equals worked on a null paramer: description
OK-1: MBeanOperationInfo.equals worked on a null paramer: MBeanParameterInfo
OK-2: MBeanOperationInfo.equals worked on a null paramer: MBeanParameterInfo
OK-3: MBeanOperationInfo.equals worked on a null paramer: MBeanParameterInfo
--->KO-1!!! MBeanOperationInfo.equals got NPE if null paramer: type
OK-2: MBeanOperationInfo.equals worked on a null paramer: type
OK-3: MBeanOperationInfo.equals worked on a null paramer: type
--->KO-1!!! MBeanOperationInfo.equals got NPE if null paramer: native impact
OK-2: MBeanOperationInfo.equals worked on a null paramer: native impact
OK-3: MBeanOperationInfo.equals worked on a null paramer: native impact
--->KO-1!!! MBeanOperationInfo.equals got NPE if null paramer: Descriptor
OK-2: MBeanOperationInfo.equals worked on a null paramer: Descriptor
OK-3: MBeanOperationInfo.equals worked on a null paramer: Descriptor

---Testing on MBeanParameterInfo...
--->KO-1!!! MBeanParameterInfo.equals got NPE if null paramer: name
OK-2: MBeanParameterInfo.equals worked on a null paramer: name
OK-3: MBeanParameterInfo.equals worked on a null paramer: name
--->KO-1!!! MBeanParameterInfo.equals got NPE if null paramer: description
OK-2: MBeanParameterInfo.equals worked on a null paramer: description
OK-3: MBeanParameterInfo.equals worked on a null paramer: description
--->KO-1!!! MBeanParameterInfo.equals got NPE if null paramer: description
OK-2: MBeanParameterInfo.equals worked on a null paramer: description
OK-3: MBeanParameterInfo.equals worked on a null paramer: description
OK-1: MBeanParameterInfo.equals worked on a null paramer: Descriptor
OK-2: MBeanParameterInfo.equals worked on a null paramer: Descriptor
OK-3: MBeanParameterInfo.equals worked on a null paramer: Descriptor

---Testing on MBeanInfo...
OK-1: MBeanInfo.equals worked on a null paramer: class name
OK-2: MBeanInfo.equals worked on a null paramer: class name
OK-3: MBeanInfo.equals worked on a null paramer: class name
OK-1: MBeanInfo.equals worked on a null paramer: name
OK-2: MBeanInfo.equals worked on a null paramer: name
OK-3: MBeanInfo.equals worked on a null paramer: name
OK-1: MBeanInfo.equals worked on a null paramer: description
OK-2: MBeanInfo.equals worked on a null paramer: description
OK-3: MBeanInfo.equals worked on a null paramer: description
OK-1: MBeanInfo.equals worked on a null paramer: attrInfos
OK-2: MBeanInfo.equals worked on a null paramer: attrInfos
OK-3: MBeanInfo.equals worked on a null paramer: attrInfos
OK-1: MBeanInfo.equals worked on a null paramer: operaInfos
OK-2: MBeanInfo.equals worked on a null paramer: operaInfos
OK-3: MBeanInfo.equals worked on a null paramer: operaInfos
OK-1: MBeanInfo.equals worked on a null paramer: notifInfos
OK-2: MBeanInfo.equals worked on a null paramer: notifInfos
OK-3: MBeanInfo.equals worked on a null paramer: notifInfos
Exception in thread "main" java.lang.RuntimeException: Test failed: 13
	at MBeanInfoEqualsTest.main(MBeanInfoEqualsTest.java:170)
Java Result: 1