From f5226222f0f2d238817e6551e428dbfb5d58e76f Mon Sep 17 00:00:00 2001 From: mikhail-khludnev Date: Thu, 14 Nov 2024 19:06:08 +0300 Subject: [PATCH] combine asserts Signed-off-by: mikhail-khludnev --- .../main/java/org/opensearch/index/mapper/IpFieldMapper.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/main/java/org/opensearch/index/mapper/IpFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/IpFieldMapper.java index 4f8d81c2ca200..d30a282c57f45 100644 --- a/server/src/main/java/org/opensearch/index/mapper/IpFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/IpFieldMapper.java @@ -257,8 +257,7 @@ public Query termQuery(Object value, @Nullable QueryShardContext context) { private Query indexOrDvQuery(Query pointQuery, Query dvQuery) { if (isSearchable() && hasDocValues()) { - assert pointQuery != null; - assert dvQuery != null; + assert pointQuery != null && dvQuery != null; return new IndexOrDocValuesQuery(pointQuery, dvQuery); } else { if (isSearchable()) {