TheMLetTagTest.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:freeVM 作者:
/**
 * Exception should be thrown if in conf mlet text file exist unexpected end of file 
 */

public Result testUnexpCfg() throws Exception {

    try {
        MBeanServer server = MBeanServerFactory.createMBeanServer();
        MLet mlet = new MLet();
        ObjectName name = new ObjectName("test:name=mlet");

        server.registerMBean(mlet, name);
        server.invoke(name, "getMBeansFromURL", new Object[] { MLET_URL
                + "unexp.conf" }, new String[] { String.class.getName() });
    } catch (MBeanException e) {
        //e.printStackTrace();
        return passed();
    } catch (Exception exp) {
        //exp.printStackTrace();
        return failed("Unexpected Exception");

    }
    return failed("javax.management.MBeanException is absence");
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号