18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import javax.management.MBeanAttributeInfo;
25 import javax.management.MBeanConstructorInfo;
26 import javax.management.MBeanInfo;
27 import javax.management.MBeanNotificationInfo;
28 import javax.management.MBeanOperationInfo;
29 import javax.management.MBeanParameterInfo;
30 import javax.management.modelmbean.DescriptorSupport;
31 import javax.management.openmbean.SimpleType;
32
33 /*
34 * @test
35 * @bug 8023669
36 * @summary Test that hashCode()throws NullPointerException
37 * @author Shanliang JIANG
38 * @modules java.management
39 * @run clean MBeanInfoHashCodeNPETest
40 * @run build MBeanInfoHashCodeNPETest
41 * @run main MBeanInfoHashCodeNPETest
42 */
43 public class MBeanInfoHashCodeNPETest {
44 private static int failed = 0;
45
46 public static void main(String[] args) throws Exception {
47 System.out.println("---MBeanInfoHashCodeNPETest-main ...");
48
49 // ----
50 System.out.println("\n---Testing on MBeanAttributeInfo...");
51 MBeanAttributeInfo mbeanAttributeInfo = new MBeanAttributeInfo(
52 null, SimpleType.INTEGER.getClassName(), "description", true, true, false);
53 test(mbeanAttributeInfo, "class name");
54
55 mbeanAttributeInfo = new MBeanAttributeInfo(
56 "name", null, "description", true, true, false);
57 test(mbeanAttributeInfo, "type");
58
|
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import javax.management.MBeanAttributeInfo;
25 import javax.management.MBeanConstructorInfo;
26 import javax.management.MBeanInfo;
27 import javax.management.MBeanNotificationInfo;
28 import javax.management.MBeanOperationInfo;
29 import javax.management.MBeanParameterInfo;
30 import javax.management.modelmbean.DescriptorSupport;
31 import javax.management.openmbean.SimpleType;
32
33 /*
34 * @test
35 * @bug 8023669
36 * @summary Test that hashCode()throws NullPointerException
37 * @author Shanliang JIANG
38 *
39 * @run clean MBeanInfoHashCodeNPETest
40 * @run build MBeanInfoHashCodeNPETest
41 * @run main MBeanInfoHashCodeNPETest
42 */
43 public class MBeanInfoHashCodeNPETest {
44 private static int failed = 0;
45
46 public static void main(String[] args) throws Exception {
47 System.out.println("---MBeanInfoHashCodeNPETest-main ...");
48
49 // ----
50 System.out.println("\n---Testing on MBeanAttributeInfo...");
51 MBeanAttributeInfo mbeanAttributeInfo = new MBeanAttributeInfo(
52 null, SimpleType.INTEGER.getClassName(), "description", true, true, false);
53 test(mbeanAttributeInfo, "class name");
54
55 mbeanAttributeInfo = new MBeanAttributeInfo(
56 "name", null, "description", true, true, false);
57 test(mbeanAttributeInfo, "type");
58
|