Producteev: Fix case where there is no array returned in json invocation

pull/14/head
Tim Su 15 years ago
parent f161294848
commit 61003bd535

@ -656,6 +656,8 @@ public class ProducteevInvoker {
*/
private JSONArray getResponse(JSONObject response, String field) throws ApiResponseParseException {
try {
if(!response.has(field))
return new JSONArray();
return response.getJSONArray(field);
} catch (JSONException e) {
throw new ApiResponseParseException(e);

Loading…
Cancel
Save