diff --git a/src/main/java/org/opensearch/security/user/UserService.java b/src/main/java/org/opensearch/security/user/UserService.java index c01a68fa4e..3ef668d3f9 100644 --- a/src/main/java/org/opensearch/security/user/UserService.java +++ b/src/main/java/org/opensearch/security/user/UserService.java @@ -335,14 +335,14 @@ public void includeAccountsIfType(SecurityDynamicConfiguration configuration, List toBeRemoved = new ArrayList<>(); if (requestedAccountType == UserFilterType.SERVICE) { - accountToRemoveFromConfig(configuration, toBeRemoved, false); + accountsToRemoveFromConfiguration(configuration, toBeRemoved, false); } else if (requestedAccountType == UserFilterType.INTERNAL) { - accountToRemoveFromConfig(configuration, toBeRemoved, true); + accountsToRemoveFromConfiguration(configuration, toBeRemoved, true); } configuration.remove(toBeRemoved); } - private void accountsToRemoveFromConfiguration(SecurityDynamicConfiguration configuration, ArrayList toBeRemoved, boolean isServiceAccountRequested) { + private void accountsToRemoveFromConfiguration(SecurityDynamicConfiguration configuration, List toBeRemoved, boolean isServiceAccountRequested) { for (Map.Entry entry : configuration.getCEntries().entrySet()) { final InternalUserV7 internalUserEntry = (InternalUserV7) entry.getValue(); final Map accountAttributes = internalUserEntry.getAttributes();