StreamSummary: Accept null values

This patch allows the StreamSummary to support missing values that return
from the API.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This commit is contained in:
Amnon Heiman 2015-12-31 12:19:11 +02:00
parent 2840880e95
commit cda7448314

View File

@ -62,6 +62,9 @@ public class StreamSummary
}
public static Collection<StreamSummary> fromJsonArr(JsonArray arr) {
if (arr == null) {
return null;
}
Collection<StreamSummary> res = new ArrayList<StreamSummary>();
for (int i = 0; i < arr.size(); i++) {
res.add(fromJsonObject(arr.getJsonObject(i)));