fixed build - cleaned up the use of guava Maps
Original commit: elastic/x-pack-elasticsearch@05b2dc4c57
This commit is contained in:
parent
7ae3a42c08
commit
2004cb6ad8
|
@ -389,7 +389,7 @@ public class ESUsersTool extends CliTool {
|
||||||
roles.addAll(Arrays.asList(addRoles));
|
roles.addAll(Arrays.asList(addRoles));
|
||||||
roles.removeAll(Arrays.asList(removeRoles));
|
roles.removeAll(Arrays.asList(removeRoles));
|
||||||
|
|
||||||
Map<String, String[]> userRolesToWrite = Maps.newHashMapWithExpectedSize(userRoles.size());
|
Map<String, String[]> userRolesToWrite = new HashMap<>(userRoles.size());
|
||||||
userRolesToWrite.putAll(userRoles);
|
userRolesToWrite.putAll(userRoles);
|
||||||
if (roles.size() == 0) {
|
if (roles.size() == 0) {
|
||||||
userRolesToWrite.remove(username);
|
userRolesToWrite.remove(username);
|
||||||
|
|
Loading…
Reference in New Issue