Code example for MalformedObjectNameException

Methods: getMessage

0
        try { 
            return new ObjectName(this.discover.getDomain(),
                                  attributes);
        } catch (MalformedObjectNameException e) {
            //wont happen. 
            throw new IllegalArgumentException(e.getMessage());
        } 
    } 
 
    private ObjectName getJVMRuntime() {
        String jvm = getAttribute(ATTR_JVM_RUNTIME);
        if (jvm == null) {
            return null; 
        } 
        try { 
            return new ObjectName(jvm);
        } catch (MalformedObjectNameException e) {
            //wont happen. 
            throw new IllegalArgumentException(e.getMessage());
        }