This closes #2215
This commit is contained in:
commit
3bb7df2de4
|
@ -1923,10 +1923,12 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
|
||||||
obj.add("principal", sess.getValidatedUser());
|
obj.add("principal", sess.getValidatedUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
String metadata = sess.getMetaData() == null ? null : sess.getMetaData().toString();
|
if (sess.getMetaData() != null) {
|
||||||
if (metadata != null) {
|
final JsonObjectBuilder metadata = JsonLoader.createObjectBuilder();
|
||||||
// remove leading and trailing curly brackets
|
for (Entry<String, String> entry : sess.getMetaData().entrySet()) {
|
||||||
obj.add("metadata", metadata.substring(1, metadata.length() - 1));
|
metadata.add(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
obj.add("metadata", metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
array.add(obj);
|
array.add(obj);
|
||||||
|
|
Loading…
Reference in New Issue