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

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

Related Reports
Backport:

Sub Tasks

Description
I have a test testing the method hashCode of the following classes:
   MBeanAttributeInfo
   MBeanConstructorInfo
   MBeanOperationInfo
   MBeanParameterInfo
   MBeanInfo

here is the result:
---Testing on MBeanAttributeInfo...
OK: MBeanAttributeInfo.equals worked with a null class name
--->KO!!! MBeanAttributeInfo.hashCode got NPE with a null class name
OK: MBeanAttributeInfo.toString worked with a null class name
OK: MBeanAttributeInfo.equals worked with a null type
--->KO!!! MBeanAttributeInfo.hashCode got NPE with a null type
OK: MBeanAttributeInfo.toString worked with a null type
OK: MBeanAttributeInfo.equals worked with a null description
OK: MBeanAttributeInfo.hashCode worked with a null description
OK: MBeanAttributeInfo.toString worked with a null description

---Testing on MBeanConstructorInfo...
OK: MBeanConstructorInfo.equals worked with a null name
--->KO!!! MBeanConstructorInfo.hashCode got NPE with a null name
OK: MBeanConstructorInfo.toString worked with a null name
OK: MBeanConstructorInfo.equals worked with a null description
OK: MBeanConstructorInfo.hashCode worked with a null description
OK: MBeanConstructorInfo.toString worked with a null description
OK: MBeanConstructorInfo.equals worked with a null MBeanParameterInfo
OK: MBeanConstructorInfo.hashCode worked with a null MBeanParameterInfo
OK: MBeanConstructorInfo.toString worked with a null MBeanParameterInfo
OK: MBeanConstructorInfo.equals worked with a null descriptor
OK: MBeanConstructorInfo.hashCode worked with a null descriptor
OK: MBeanConstructorInfo.toString worked with a null descriptor

---Testing on MBeanOperationInfo...
OK: MBeanOperationInfo.equals worked with a null name
--->KO!!! MBeanOperationInfo.hashCode got NPE with a null name
OK: MBeanOperationInfo.toString worked with a null name
OK: MBeanOperationInfo.equals worked with a null description
OK: MBeanOperationInfo.hashCode worked with a null description
OK: MBeanOperationInfo.toString worked with a null description
OK: MBeanOperationInfo.equals worked with a null MBeanParameterInfo
OK: MBeanOperationInfo.hashCode worked with a null MBeanParameterInfo
OK: MBeanOperationInfo.toString worked with a null MBeanParameterInfo
OK: MBeanOperationInfo.equals worked with a null type
--->KO!!! MBeanOperationInfo.hashCode got NPE with a null type
OK: MBeanOperationInfo.toString worked with a null type
OK: MBeanOperationInfo.equals worked with a null native impact
--->KO!!! MBeanOperationInfo.hashCode got NPE with a null native impact
OK: MBeanOperationInfo.toString worked with a null native impact
OK: MBeanOperationInfo.equals worked with a null Descriptor
--->KO!!! MBeanOperationInfo.hashCode got NPE with a null Descriptor
OK: MBeanOperationInfo.toString worked with a null Descriptor

---Testing on MBeanParameterInfo...
OK: MBeanParameterInfo.equals worked with a null name
--->KO!!! MBeanParameterInfo.hashCode got NPE with a null name
OK: MBeanParameterInfo.toString worked with a null name
OK: MBeanParameterInfo.equals worked with a null description
--->KO!!! MBeanParameterInfo.hashCode got NPE with a null description
OK: MBeanParameterInfo.toString worked with a null description
OK: MBeanParameterInfo.equals worked with a null description
OK: MBeanParameterInfo.hashCode worked with a null description
OK: MBeanParameterInfo.toString worked with a null description
OK: MBeanParameterInfo.equals worked with a null Descriptor
OK: MBeanParameterInfo.hashCode worked with a null Descriptor
OK: MBeanParameterInfo.toString worked with a null Descriptor

---Testing on MBeanInfo...
OK: MBeanInfo.equals worked with a null class name
--->KO!!! MBeanInfo.hashCode got NPE with a null class name
OK: MBeanInfo.toString worked with a null class name
OK: MBeanInfo.equals worked with a null name
OK: MBeanInfo.hashCode worked with a null name
OK: MBeanInfo.toString worked with a null name
OK: MBeanInfo.equals worked with a null description
OK: MBeanInfo.hashCode worked with a null description
OK: MBeanInfo.toString worked with a null description
OK: MBeanInfo.equals worked with a null attrInfos
OK: MBeanInfo.hashCode worked with a null attrInfos
OK: MBeanInfo.toString worked with a null attrInfos
OK: MBeanInfo.equals worked with a null operaInfos
OK: MBeanInfo.hashCode worked with a null operaInfos
OK: MBeanInfo.toString worked with a null operaInfos
OK: MBeanInfo.equals worked with a null notifInfos
OK: MBeanInfo.hashCode worked with a null notifInfos
OK: MBeanInfo.toString worked with a null notifInfos
Exception in thread "main" java.lang.RuntimeException: Test failed: 10
	at MBeanInfoEqualsTest.main(MBeanInfoEqualsTest.java:160)
Java Result: 1
                                    

Comments
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/ba0b95f310c8
User:  lana
Date:  2013-09-18 00:31:25 +0000

                                     
2013-09-18
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ba0b95f310c8
User:  sjiang
Date:  2013-09-13 08:49:42 +0000

                                     
2013-09-13



Hardware and Software, Engineered to Work Together