mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +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 java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@ -121,6 +122,7 @@ public class WatcherStatsResponse extends ActionResponse implements ToXContent {
|
||||
|
||||
if (in.readBoolean()) {
|
||||
int size = in.readVInt();
|
||||
snapshots = new ArrayList<>(size);
|
||||
for (int i = 0; i < size; i++) {
|
||||
snapshots.add(new WatchExecutionSnapshot(in));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user