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

@ -65,7 +65,7 @@ public class DbusCommandHandler {
SignalControl.class);
try {
final var accounts = control.listAccounts();
if (accounts.size() == 0) {
if (accounts.isEmpty()) {
throw new UserErrorException("No local users found, you first need to register or link an account");
} else if (accounts.size() > 1) {
throw new UserErrorException(