[Monitoring] HttpExportBulk shouldn't bother setting payload to null (elastic/x-pack-elasticsearch#4287)

This avoid setting the payload to `null` when sending it to the remote
monitoring cluster. The payload will be GCed when this overall object is
GCed, which should be very soon anyway.

Original commit: elastic/x-pack-elasticsearch@04f63c4150
This commit is contained in:
Chris Earle 2018-04-04 13:42:00 -04:00 committed by GitHub
parent 510f667ea8
commit aa5ee1ade9
1 changed files with 0 additions and 3 deletions

View File

@ -96,9 +96,6 @@ class HttpExportBulk extends ExportBulk {
} else if (payload.length != 0) { } else if (payload.length != 0) {
final HttpEntity body = new ByteArrayEntity(payload, ContentType.APPLICATION_JSON); final HttpEntity body = new ByteArrayEntity(payload, ContentType.APPLICATION_JSON);
// free the memory
payload = null;
client.performRequestAsync("POST", "/_bulk", params, body, new ResponseListener() { client.performRequestAsync("POST", "/_bulk", params, body, new ResponseListener() {
@Override @Override
public void onSuccess(Response response) { public void onSuccess(Response response) {