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:
parent
2840880e95
commit
cda7448314
@ -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)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user