Skip to content
Browse files

applied patch from splebel to support Object[] types

  • Loading branch information...
1 parent 3dc5ee1 commit 50ff7bbeaba8046e183f8142d3867cab92a5d6b6 @tcurdt tcurdt committed Nov 22, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/org/nagios/JMXQuery.java
View
4 src/org/nagios/JMXQuery.java
@@ -9,6 +9,7 @@
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
+import java.util.Arrays;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
@@ -201,6 +202,9 @@ private void execute() throws Exception{
} else if (attr instanceof Map) {
Map map = (Map) attr;
checkData = map.size();
+ } else if (attr instanceof Object[]) {
+ Object[] objects = (Object[]) attr;
+ checkData = Arrays.asList(objects).size();
} else{
checkData = parseData(attr);
}

0 comments on commit 50ff7bb

Please sign in to comment.
Something went wrong with that request. Please try again.