diff --git a/src/main/java/org/opensearch/security/resolver/IndexResolverReplacer.java b/src/main/java/org/opensearch/security/resolver/IndexResolverReplacer.java index d7aeb776c7..4a4e714348 100644 --- a/src/main/java/org/opensearch/security/resolver/IndexResolverReplacer.java +++ b/src/main/java/org/opensearch/security/resolver/IndexResolverReplacer.java @@ -82,6 +82,7 @@ import org.opensearch.cluster.metadata.IndexAbstraction; import org.opensearch.cluster.metadata.IndexNameExpressionResolver; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.util.IndexUtils; import org.opensearch.core.index.Index; import org.opensearch.index.IndexNotFoundException; import org.opensearch.index.reindex.ReindexRequest; @@ -91,7 +92,6 @@ import org.opensearch.security.support.SnapshotRestoreHelper; import org.opensearch.security.support.WildcardMatcher; import org.opensearch.snapshots.SnapshotInfo; -import org.opensearch.snapshots.SnapshotUtils; import org.opensearch.transport.RemoteClusterService; import org.opensearch.transport.TransportRequest; @@ -694,7 +694,7 @@ private boolean getOrReplaceAllIndices(final Object request, final IndicesProvid ); provider.provide(new String[] { "*" }, request, false); } else { - final List requestedResolvedIndices = SnapshotUtils.filterIndices( + final List requestedResolvedIndices = IndexUtils.filterIndices( snapshotInfo.indices(), restoreRequest.indices(), restoreRequest.indicesOptions() diff --git a/src/main/java/org/opensearch/security/support/SnapshotRestoreHelper.java b/src/main/java/org/opensearch/security/support/SnapshotRestoreHelper.java index 2c85177c1e..b8f5d22e7c 100644 --- a/src/main/java/org/opensearch/security/support/SnapshotRestoreHelper.java +++ b/src/main/java/org/opensearch/security/support/SnapshotRestoreHelper.java @@ -37,12 +37,12 @@ import org.opensearch.SpecialPermission; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest; import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.common.util.IndexUtils; import org.opensearch.repositories.RepositoriesService; import org.opensearch.repositories.Repository; import org.opensearch.security.OpenSearchSecurityPlugin; import org.opensearch.snapshots.SnapshotId; import org.opensearch.snapshots.SnapshotInfo; -import org.opensearch.snapshots.SnapshotUtils; import org.opensearch.threadpool.ThreadPool; public class SnapshotRestoreHelper { @@ -56,7 +56,7 @@ public static List resolveOriginalIndices(RestoreSnapshotRequest restore log.warn("snapshot repository '{}', snapshot '{}' not found", restoreRequest.repository(), restoreRequest.snapshot()); return null; } else { - return SnapshotUtils.filterIndices(snapshotInfo.indices(), restoreRequest.indices(), restoreRequest.indicesOptions()); + return IndexUtils.filterIndices(snapshotInfo.indices(), restoreRequest.indices(), restoreRequest.indicesOptions()); } }