Skip to content

Commit 73e9d71

Browse files
authored
response error node except int 0
some server response has error node. when success the error node is int value 0;
1 parent df5aa24 commit 73e9d71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ private boolean isIdValueNotCorrect(String id, ObjectNode jsonObject) {
325325
}
326326

327327
protected boolean hasError(ObjectNode jsonObject) {
328-
return jsonObject.has(ERROR) && jsonObject.get(ERROR) != null && !jsonObject.get(ERROR).isNull();
328+
return jsonObject.has(ERROR) && jsonObject.get(ERROR) != null && !jsonObject.get(ERROR).isNull() && !(jsonObject.get(ERROR).isInt() && jsonObject.intValue()==0) ;
329329
}
330330

331331
/**

0 commit comments

Comments
 (0)