From 3c2a97ed2981ce8a1590d85fa24a0de00e161971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=A6=D1=8B=D0=BF?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Wed, 24 Jun 2020 17:24:08 +0300 Subject: [PATCH] Use more efficient singletonList in JdbcAclService --- .../springframework/security/acls/jdbc/JdbcAclService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acl/src/main/java/org/springframework/security/acls/jdbc/JdbcAclService.java b/acl/src/main/java/org/springframework/security/acls/jdbc/JdbcAclService.java index 03789529b9..f2cb89f909 100644 --- a/acl/src/main/java/org/springframework/security/acls/jdbc/JdbcAclService.java +++ b/acl/src/main/java/org/springframework/security/acls/jdbc/JdbcAclService.java @@ -16,7 +16,7 @@ package org.springframework.security.acls.jdbc; import java.io.Serializable; -import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; @@ -99,7 +99,7 @@ public class JdbcAclService implements AclService { return new ObjectIdentityImpl(javaType, identifier); }); - if (objects.size() == 0) { + if (objects.isEmpty()) { return null; } @@ -108,7 +108,7 @@ public class JdbcAclService implements AclService { public Acl readAclById(ObjectIdentity object, List sids) throws NotFoundException { - Map map = readAclsById(Arrays.asList(object), sids); + Map map = readAclsById(Collections.singletonList(object), sids); Assert.isTrue(map.containsKey(object), () -> "There should have been an Acl entry for ObjectIdentity " + object);