12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
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 /*
25 * @test
26 * @bug 4967769 4980655 4980668 4981214
27 * @summary Test that ModelMBeanInfoSupport.setDescriptor rejects
28 * null descriptor, that empty arrays are handled correctly,
29 * that getDescriptors("mbean") works, and that default values for
30 * MBean descriptors are correctly assigned.
31 * @author Eamonn McManus
32 * @modules java.management
33 * @run clean InfoSupportTest
34 * @run build InfoSupportTest
35 * @run main InfoSupportTest
36 */
37
38 import java.util.*;
39 import javax.management.Descriptor;
40 import javax.management.RuntimeOperationsException;
41 import javax.management.modelmbean.*;
42
43 public class InfoSupportTest {
44 public static void main(String[] args) throws Exception {
45 boolean ok = true;
46
47 ok &= testSetDescriptorNull();
48 ok &= testEmptyArrayParameters();
49 ok &= testGetDescriptorsForMBean();
50
51 if (ok)
52 System.out.println("Test passed");
|
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
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 /*
25 * @test
26 * @bug 4967769 4980655 4980668 4981214
27 * @summary Test that ModelMBeanInfoSupport.setDescriptor rejects
28 * null descriptor, that empty arrays are handled correctly,
29 * that getDescriptors("mbean") works, and that default values for
30 * MBean descriptors are correctly assigned.
31 * @author Eamonn McManus
32 *
33 * @run clean InfoSupportTest
34 * @run build InfoSupportTest
35 * @run main InfoSupportTest
36 */
37
38 import java.util.*;
39 import javax.management.Descriptor;
40 import javax.management.RuntimeOperationsException;
41 import javax.management.modelmbean.*;
42
43 public class InfoSupportTest {
44 public static void main(String[] args) throws Exception {
45 boolean ok = true;
46
47 ok &= testSetDescriptorNull();
48 ok &= testEmptyArrayParameters();
49 ok &= testGetDescriptorsForMBean();
50
51 if (ok)
52 System.out.println("Test passed");
|