United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8023954 : MBean*Info.equals: throw NPE

Details
Type:
Bug
Submit Date:
2013-08-29
Status:
Closed
Updated Date:
2014-01-15
Project Name:
JDK
Resolved Date:
2013-09-18
Component:
core-svc
OS:
Sub-Component:
javax.management
CPU:
Priority:
P2
Resolution:
Fixed
Affected Versions:
Fixed Versions:

Related Reports
Backport:

Sub Tasks

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
                                    

Comments
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/8708569b5524
User:  lana
Date:  2013-10-01 17:37:37 +0000

                                     
2013-10-01
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/8708569b5524
User:  sjiang
Date:  2013-09-18 06:52:58 +0000

                                     
2013-09-18



Hardware and Software, Engineered to Work Together