1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Improve readability of empty collection checks

This commit is contained in:
kwonyonghyun
2024-10-15 03:49:39 +09:00
committed by Josh Cummings
parent 31bdaf720d
commit b8aa78829c
9 changed files with 16 additions and 16 deletions
@@ -202,7 +202,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
public boolean isSidLoaded(List<Sid> sids) {
// If loadedSides is null, this indicates all SIDs were loaded
// Also return true if the caller didn't specify a SID to find
if ((this.loadedSids == null) || (sids == null) || (sids.size() == 0)) {
if ((this.loadedSids == null) || (sids == null) || sids.isEmpty()) {
return true;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -140,7 +140,7 @@ public class DefaultPermissionFactory implements PermissionFactory {
@Override
public List<Permission> buildFromNames(List<String> names) {
if ((names == null) || (names.size() == 0)) {
if ((names == null) || names.isEmpty()) {
return Collections.emptyList();
}
List<Permission> permissions = new ArrayList<>(names.size());