Code example for MalformedObjectNameException

Methods: getMessage

0
        getAttributes(mServer, name, ATTRS_SERVER_CONFIG);
 
        try { 
            name = new ObjectName(SERVER_INFO_NAME);
        } catch (MalformedObjectNameException e) {
            throw new IllegalArgumentException(e.getMessage());
        } 
 
        getAttributes(mServer, name, ATTRS_SERVER_INFO);
 
        //remove build id 
        String fullVersion =
                getAttribute(ATTR_VERSION).substring(0, 5);
        setAttribute("version", fullVersion); //cprop defined in hq-plugin.xml
        String ver = fullVersion.substring(0, 3);
        setVersion(ver);
 
        setName(getAttribute(ATTR_SERVER_NAME));
        setInstallPath(getAttribute(ATTR_HOMEDIR));
    } 
Experience pair programming with AI  Get Codota for Java