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

@ -45,7 +45,7 @@ record JsonSyncMessage(
blockedGroupIds = null;
}
final var readMessages = syncMessage.read().size() > 0 ? syncMessage.read()
final var readMessages = !syncMessage.read().isEmpty() ? syncMessage.read()
.stream()
.map(JsonSyncReadMessage::from)
.toList() : null;