APIClient: Fixing parsing long as int

The APIClient use getInt to return a long value wich can cause number
trancation.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This commit is contained in:
Amnon Heiman 2015-12-29 17:41:20 +02:00
parent 2eb9f19236
commit 71c4e892f6

View File

@ -576,7 +576,7 @@ public class APIClient {
if (obj.get(k) instanceof JsonString) { if (obj.get(k) instanceof JsonString) {
key = obj.getString(k); key = obj.getString(k);
} else { } else {
val = obj.getInt(k); val = obj.getJsonNumber(k).longValue();
} }
} }
if (val > 0 && !key.equals("")) { if (val > 0 && !key.equals("")) {