< prev index next >

test/javax/management/MBeanInfo/MBeanInfoEqualsNPETest.java

Print this page
rev 16783 : 8176176: fix @modules in jdk_svc tests
Reviewed-by: duke


  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.MBeanFeatureInfo;
  27 import javax.management.MBeanInfo;
  28 import javax.management.MBeanNotificationInfo;
  29 import javax.management.MBeanOperationInfo;
  30 import javax.management.MBeanParameterInfo;
  31 import javax.management.modelmbean.DescriptorSupport;
  32 import javax.management.openmbean.SimpleType;
  33 
  34 /*
  35  * @test
  36  * @bug 8023954
  37  * @summary Test that MBean*Info.equals do not throw NPE
  38  * @author Shanliang JIANG
  39  * @modules java.management
  40  * @run clean MBeanInfoEqualsNPETest
  41  * @run build MBeanInfoEqualsNPETest
  42  * @run main MBeanInfoEqualsNPETest
  43  */
  44 public class MBeanInfoEqualsNPETest {
  45     private static int failed = 0;
  46 
  47     public static void main(String[] args) throws Exception {
  48         System.out.println("---MBeanInfoEqualsNPETest-main ...");
  49 
  50         // ----
  51         System.out.println("\n---Testing on MBeanAttributeInfo...");
  52         MBeanAttributeInfo mbeanAttributeInfo0 = new MBeanAttributeInfo(
  53                 "name", SimpleType.INTEGER.getClassName(), "description", true, true, false);
  54         MBeanAttributeInfo mbeanAttributeInfo = new MBeanAttributeInfo(
  55                 null, SimpleType.INTEGER.getClassName(), "description", true, true, false);
  56         test(mbeanAttributeInfo0, mbeanAttributeInfo, "class name");
  57 
  58         mbeanAttributeInfo = new MBeanAttributeInfo(
  59                 "name", null, "description", true, true, false);




  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.MBeanFeatureInfo;
  27 import javax.management.MBeanInfo;
  28 import javax.management.MBeanNotificationInfo;
  29 import javax.management.MBeanOperationInfo;
  30 import javax.management.MBeanParameterInfo;
  31 import javax.management.modelmbean.DescriptorSupport;
  32 import javax.management.openmbean.SimpleType;
  33 
  34 /*
  35  * @test
  36  * @bug 8023954
  37  * @summary Test that MBean*Info.equals do not throw NPE
  38  * @author Shanliang JIANG
  39  *
  40  * @run clean MBeanInfoEqualsNPETest
  41  * @run build MBeanInfoEqualsNPETest
  42  * @run main MBeanInfoEqualsNPETest
  43  */
  44 public class MBeanInfoEqualsNPETest {
  45     private static int failed = 0;
  46 
  47     public static void main(String[] args) throws Exception {
  48         System.out.println("---MBeanInfoEqualsNPETest-main ...");
  49 
  50         // ----
  51         System.out.println("\n---Testing on MBeanAttributeInfo...");
  52         MBeanAttributeInfo mbeanAttributeInfo0 = new MBeanAttributeInfo(
  53                 "name", SimpleType.INTEGER.getClassName(), "description", true, true, false);
  54         MBeanAttributeInfo mbeanAttributeInfo = new MBeanAttributeInfo(
  55                 null, SimpleType.INTEGER.getClassName(), "description", true, true, false);
  56         test(mbeanAttributeInfo0, mbeanAttributeInfo, "class name");
  57 
  58         mbeanAttributeInfo = new MBeanAttributeInfo(
  59                 "name", null, "description", true, true, false);


< prev index next >