JDK-8023669 : MBean*Info.hashCode : NPE
  • Type: Bug
  • Component: core-svc
  • Sub-Component: javax.management
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-08-23
  • Updated: 2024-10-30
  • Resolved: 2013-09-13
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 b108Fixed
Related Reports
Duplicate :  
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
18-09-2013

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