From 876871eb1f392cd800d82409f776a9afa8dc79ba Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 24 Apr 2023 16:22:55 -0400 Subject: [PATCH] Update iterator Signed-off-by: Stephen Crawford --- .../privileges/PrivilegesEvaluator.java | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java b/src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java index 5a796f3129..b77b7a000f 100644 --- a/src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java +++ b/src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java @@ -26,7 +26,6 @@ package org.opensearch.security.privileges; -import com.carrotsearch.hppc.cursors.ObjectCursor; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -650,23 +649,7 @@ private boolean checkFilteredAliases(Resolved requestedResolved, String action, indexMetaDataCollection = new Iterable() { @Override public Iterator iterator() { - final Iterator> iterator = clusterService.state().getMetadata().getIndices().values().iterator(); - return new Iterator() { - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public IndexMetadata next() { - return iterator.next().value; - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - }; + return clusterService.state().getMetadata().getIndices().values().iterator(); } }; } else {