diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AuthManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AuthManager.java index 7f9853d89397..a24e9d66ced9 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AuthManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AuthManager.java @@ -19,7 +19,6 @@ import java.io.IOException; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -66,7 +65,7 @@ private static class PermissionCache { void put(String name, T perm) { synchronized (mutex) { - Set perms = cache.getOrDefault(name, new HashSet<>()); + Set perms = cache.getOrDefault(name, ConcurrentHashMap.newKeySet()); perms.add(perm); cache.put(name, perms); }