Added missing builder.endObject calls

This commit is contained in:
Alexander Reelsen 2013-10-13 14:03:54 +02:00
parent 529b9c8b39
commit df95453430
2 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,7 @@ public class RestPendingClusterTasksAction extends BaseRestHandler {
XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
builder.startObject();
response.toXContent(builder, request);
builder.endObject();
channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder));
} catch (Throwable e) {
onFailure(e);

View File

@ -172,6 +172,7 @@ public class RiversService extends AbstractLifecycleComponent<RiversService> {
builder.field("name", clusterService.localNode().name());
builder.field("transport_address", clusterService.localNode().address().toString());
builder.endObject();
builder.endObject();
client.prepareIndex(riverIndexName, riverName.name(), "_status")
.setConsistencyLevel(WriteConsistencyLevel.ONE)