This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git

commit 7a6c19c8f5b6122df3a55e957311bdfceba57e53
Author: Francesco Chicchiriccò <ilgro...@apache.org>
AuthorDate: Tue Feb 7 08:53:08 2023 +0100

    Avoid to throw NPE after delegated admin access to Console
---
 .../java/org/apache/syncope/client/console/SyncopeConsoleSession.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
 
b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
index d81e6fc4ac..0b6878ef36 100644
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
@@ -64,6 +64,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.core.task.TaskRejectedException;
 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+import org.springframework.util.CollectionUtils;
 
 public class SyncopeConsoleSession extends AuthenticatedWebSession {
 
@@ -295,7 +296,7 @@ public class SyncopeConsoleSession extends 
AuthenticatedWebSession {
 
     public List<String> getSearchableRealms() {
         Set<String> roots = auth.get(StandardEntitlement.REALM_LIST);
-        return roots.isEmpty()
+        return CollectionUtils.isEmpty(roots)
                 ? Collections.emptyList()
                 : roots.stream().sorted().collect(Collectors.toList());
     }

Reply via email to