From c409cb469f45e959101807ccf0e957439874f9bf Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 9 Oct 2008 06:06:58 +0000 Subject: [PATCH] handle List type MBeanClassName --- .../java/src/org/hyperic/sigar/jmx/ReflectedMBean.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bindings/java/src/org/hyperic/sigar/jmx/ReflectedMBean.java b/bindings/java/src/org/hyperic/sigar/jmx/ReflectedMBean.java index 50c907fd..990399c4 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/ReflectedMBean.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/ReflectedMBean.java @@ -78,7 +78,13 @@ public class ReflectedMBean extends AbstractMBean { } private String getMBeanClassName() { - return "org.hyperic.sigar." + getType(); + String type = getType(); + final String list = "List"; + if (type.endsWith(list)) { + type = + type.substring(0, type.length() - list.length()); + } + return "org.hyperic.sigar." + type; } private Class getMBeanClass() {