diff --git a/src/main/java/org/opensearch/security/configuration/DlsFilterLevelActionHandler.java b/src/main/java/org/opensearch/security/configuration/DlsFilterLevelActionHandler.java index f56eae4c5d..09364238e1 100644 --- a/src/main/java/org/opensearch/security/configuration/DlsFilterLevelActionHandler.java +++ b/src/main/java/org/opensearch/security/configuration/DlsFilterLevelActionHandler.java @@ -25,8 +25,8 @@ import java.util.function.Function; import java.util.stream.Collectors; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import org.opensearch.OpenSearchSecurityException; import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; @@ -69,7 +69,7 @@ import org.opensearch.security.support.SecurityUtils; public class DlsFilterLevelActionHandler { - private static final Logger log = LogManager.getLogger(DlsFilterLevelActionHandler.class); + private static final Logger log = LoggerFactory.getLogger(DlsFilterLevelActionHandler.class); private static final Function LOCAL_CLUSTER_ALIAS_GETTER = ReflectiveAttributeAccessors .protectedObjectAttr("localClusterAlias", String.class); diff --git a/src/main/java/org/opensearch/security/configuration/DlsQueryParser.java b/src/main/java/org/opensearch/security/configuration/DlsQueryParser.java index cf533dcb91..7881038a83 100644 --- a/src/main/java/org/opensearch/security/configuration/DlsQueryParser.java +++ b/src/main/java/org/opensearch/security/configuration/DlsQueryParser.java @@ -21,8 +21,8 @@ import java.util.concurrent.TimeUnit; import java.util.function.Function; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.BooleanQuery; @@ -48,7 +48,7 @@ public final class DlsQueryParser { - private static final Logger log = LogManager.getLogger(DlsQueryParser.class); + private static final Logger log = LoggerFactory.getLogger(DlsQueryParser.class); private static final Query NON_NESTED_QUERY; static { diff --git a/src/test/java/org/opensearch/security/dlic/dlsfls/AbstractDlsFlsTest.java b/src/test/java/org/opensearch/security/dlic/dlsfls/AbstractDlsFlsTest.java index 556252685e..2ea9bf4462 100644 --- a/src/test/java/org/opensearch/security/dlic/dlsfls/AbstractDlsFlsTest.java +++ b/src/test/java/org/opensearch/security/dlic/dlsfls/AbstractDlsFlsTest.java @@ -20,7 +20,6 @@ import java.util.Map; import java.util.Set; -import org.apache.logging.log4j.util.Strings; import org.junit.Assert; import org.opensearch.action.get.GetResponse; import org.opensearch.action.get.MultiGetResponse; @@ -103,11 +102,11 @@ protected MultiSearchResponse executeMSearchMatchAll(String user, String passwor protected MultiGetResponse executeMGet(String user, String password, Map indicesAndIds) throws Exception { - Set indexAndIdJson = new HashSet<>(); + Set indexAndIdJson = new HashSet<>(); for (Map.Entry indexAndId : indicesAndIds.entrySet()) { indexAndIdJson.add("{ \"_index\": \""+indexAndId.getKey()+"\", \"_id\": \""+indexAndId.getValue()+"\" }"); } - String body = "{ \"docs\": ["+ Strings.join(indexAndIdJson, ',') +"] }"; + String body = "{ \"docs\": ["+ String.join(",", indexAndIdJson) +"] }"; HttpResponse response = rh.executePostRequest("/_mget?pretty", body,encodeBasicHeader(user, password)); Assert.assertEquals(200, response.getStatusCode());