mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 17:38:44 +00:00
stats: fix npe during serialization
Original commit: elastic/x-pack-elasticsearch@3233836d0b
This commit is contained in:
parent
60c7e92ced
commit
284a60e16d
@ -17,6 +17,7 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||||||
import org.elasticsearch.watcher.execution.WatchExecutionSnapshot;
|
import org.elasticsearch.watcher.execution.WatchExecutionSnapshot;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
@ -121,6 +122,7 @@ public class WatcherStatsResponse extends ActionResponse implements ToXContent {
|
|||||||
|
|
||||||
if (in.readBoolean()) {
|
if (in.readBoolean()) {
|
||||||
int size = in.readVInt();
|
int size = in.readVInt();
|
||||||
|
snapshots = new ArrayList<>(size);
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
snapshots.add(new WatchExecutionSnapshot(in));
|
snapshots.add(new WatchExecutionSnapshot(in));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user