Skip to content

Commit

Permalink
response error node except int 0
Browse files Browse the repository at this point in the history
some server response has error node. when success the error node is int value 0;
  • Loading branch information
anysoft authored Nov 15, 2019
1 parent df5aa24 commit 73e9d71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ private boolean isIdValueNotCorrect(String id, ObjectNode jsonObject) {
}

protected boolean hasError(ObjectNode jsonObject) {
return jsonObject.has(ERROR) && jsonObject.get(ERROR) != null && !jsonObject.get(ERROR).isNull();
return jsonObject.has(ERROR) && jsonObject.get(ERROR) != null && !jsonObject.get(ERROR).isNull() && !(jsonObject.get(ERROR).isInt() && jsonObject.intValue()==0) ;
}

/**
Expand Down

0 comments on commit 73e9d71

Please sign in to comment.