Use .isEmpty() for checking lists and strings

This commit is contained in:
AsamK 2023-10-17 20:01:59 +02:00
parent 9ba70c1808
commit d51dd7ae57
17 changed files with 70 additions and 70 deletions

View file

@ -85,7 +85,7 @@ public class ListGroupsCommand implements JsonRpcLocalCommand {
final var groupIdStrings = ns.<String>getList("group-id");
final var groupIds = CommandUtil.getGroupIds(groupIdStrings);
if (groupIds.size() > 0) {
if (!groupIds.isEmpty()) {
groups = groups.stream().filter(g -> groupIds.contains(g.groupId())).toList();
}