diff --git a/shield/src/main/java/org/elasticsearch/shield/authc/esusers/tool/ESUsersTool.java b/shield/src/main/java/org/elasticsearch/shield/authc/esusers/tool/ESUsersTool.java index 62c8504a680..b2e13a99729 100644 --- a/shield/src/main/java/org/elasticsearch/shield/authc/esusers/tool/ESUsersTool.java +++ b/shield/src/main/java/org/elasticsearch/shield/authc/esusers/tool/ESUsersTool.java @@ -389,7 +389,7 @@ public class ESUsersTool extends CliTool { roles.addAll(Arrays.asList(addRoles)); roles.removeAll(Arrays.asList(removeRoles)); - Map userRolesToWrite = Maps.newHashMapWithExpectedSize(userRoles.size()); + Map userRolesToWrite = new HashMap<>(userRoles.size()); userRolesToWrite.putAll(userRoles); if (roles.size() == 0) { userRolesToWrite.remove(username);