use SigarVersion bean

This commit is contained in:
Doug MacEachern 2009-04-29 10:56:14 -07:00
parent 0a1a3de69f
commit 6ef73dcbcb
1 changed files with 1 additions and 9 deletions

View File

@ -19,8 +19,6 @@
package org.hyperic.sigar.jmx; package org.hyperic.sigar.jmx;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.management.AttributeNotFoundException; import javax.management.AttributeNotFoundException;
import javax.management.MBeanConstructorInfo; import javax.management.MBeanConstructorInfo;
@ -65,8 +63,6 @@ public class SigarRegistry extends AbstractMBean {
private static final String MBEAN_TYPE = "SigarRegistry"; private static final String MBEAN_TYPE = "SigarRegistry";
private static final Map VERSION_ATTRS = new LinkedHashMap();
private static final MBeanInfo MBEAN_INFO; private static final MBeanInfo MBEAN_INFO;
private static final MBeanConstructorInfo MBEAN_CONSTR_DEFAULT; private static final MBeanConstructorInfo MBEAN_CONSTR_DEFAULT;
@ -116,11 +112,7 @@ public class SigarRegistry extends AbstractMBean {
* @see javax.management.DynamicMBean#getAttribute(java.lang.String) * @see javax.management.DynamicMBean#getAttribute(java.lang.String)
*/ */
public Object getAttribute(String attr) throws AttributeNotFoundException { public Object getAttribute(String attr) throws AttributeNotFoundException {
Object obj = VERSION_ATTRS.get(attr); throw new AttributeNotFoundException(attr);
if (obj == null) {
throw new AttributeNotFoundException(attr);
}
return obj;
} }
/* (non-Javadoc) /* (non-Javadoc)