mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-03 04:50:37 +00:00
Use .isEmpty() for checking lists and strings
This commit is contained in:
parent
9ba70c1808
commit
d51dd7ae57
17 changed files with 70 additions and 70 deletions
|
@ -127,7 +127,7 @@ public class JsonRpcReader {
|
|||
Util.closeExecutorService(executor);
|
||||
}
|
||||
|
||||
if (responseList.size() > 0) {
|
||||
if (!responseList.isEmpty()) {
|
||||
jsonRpcSender.sendBatchResponses(responseList);
|
||||
}
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ public class JsonRpcReader {
|
|||
null), null));
|
||||
return null;
|
||||
} else if (jsonNode.isArray()) {
|
||||
if (jsonNode.size() == 0) {
|
||||
if (jsonNode.isEmpty()) {
|
||||
jsonRpcSender.sendResponse(JsonRpcResponse.forError(new JsonRpcResponse.Error(JsonRpcResponse.Error.INVALID_REQUEST,
|
||||
"invalid request",
|
||||
null), null));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue