Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ private static void writeAttribute(JsonWriter writer, MBeanServer mBeanServer, O
if ("modelerType".equals(attName)) {
return;
}
if (attName.indexOf("=") >= 0 || attName.indexOf(":") >= 0 || attName.indexOf(" ") >= 0) {
if (attName.indexOf("=") >= 0 || attName.indexOf(" ") >= 0) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private MBeanServer getMockMBeanServer() throws Exception {
MBeanInfo mbeanInfo = mock(MBeanInfo.class);
when(mbeanInfo.getClassName()).thenReturn("testClassName");
String[] attributeNames = new String[] {"intAttr", "nanAttr", "infinityAttr",
"strAttr", "boolAttr"};
"strAttr", "boolAttr", "test:Attr"};
MBeanAttributeInfo[] attributeInfos = new MBeanAttributeInfo[attributeNames.length];
for (int i = 0; i < attributeInfos.length; i++) {
attributeInfos[i] = new MBeanAttributeInfo(attributeNames[i],
Expand All @@ -77,6 +77,7 @@ private MBeanServer getMockMBeanServer() throws Exception {
thenReturn(Double.POSITIVE_INFINITY);
when(mbeanServer.getAttribute(any(), eq("strAttr"))).thenReturn("aString");
when(mbeanServer.getAttribute(any(), eq("boolAttr"))).thenReturn(true);
when(mbeanServer.getAttribute(any(), eq("test:Attr"))).thenReturn("aString");
return mbeanServer;
}

Expand All @@ -92,7 +93,8 @@ private String getExpectedJSON() {
pw.println(" \"nanAttr\": \"NaN\",");
pw.println(" \"infinityAttr\": \"Infinity\",");
pw.println(" \"strAttr\": \"aString\",");
pw.println(" \"boolAttr\": true");
pw.println(" \"boolAttr\": true,");
pw.println(" \"test:Attr\": aString");
pw.println(" }");
pw.println(" ]");
pw.print("}");
Expand Down