Nodes Info API: Failed to generate REST response when node attributes are set, closes #201.

This commit is contained in:
kimchy 2010-06-02 01:10:43 +03:00
parent a7ad295f63
commit 5ef421e779
1 changed files with 2 additions and 2 deletions

View File

@ -70,11 +70,11 @@ public class RestNodesInfoAction extends BaseRestHandler {
builder.field("name", nodeInfo.node().name());
builder.field("transport_address", nodeInfo.node().address().toString());
builder.startArray("attributes");
builder.startObject("attributes");
for (Map.Entry<String, String> attr : nodeInfo.node().attributes().entrySet()) {
builder.field(attr.getKey(), attr.getValue());
}
builder.endArray();
builder.endObject();
for (Map.Entry<String, String> nodeAttribute : nodeInfo.attributes().entrySet()) {
builder.field(nodeAttribute.getKey(), nodeAttribute.getValue());