From 83cc1ae60885a2386c5d7438de44a54dfeb2c48a Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 11 Mar 2024 09:50:24 -0700 Subject: [PATCH] Addressing review comments around boolean check convention Signed-off-by: Ankit Jain --- .../org/opensearch/search/fetch/subphase/InnerHitsPhase.java | 2 +- .../org/opensearch/search/fetch/subphase/ScriptFieldsPhase.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/opensearch/search/fetch/subphase/InnerHitsPhase.java b/server/src/main/java/org/opensearch/search/fetch/subphase/InnerHitsPhase.java index 7fe2637e6c094..cadad8529da9d 100644 --- a/server/src/main/java/org/opensearch/search/fetch/subphase/InnerHitsPhase.java +++ b/server/src/main/java/org/opensearch/search/fetch/subphase/InnerHitsPhase.java @@ -64,7 +64,7 @@ public InnerHitsPhase(FetchPhase fetchPhase) { @Override public FetchSubPhaseProcessor getProcessor(FetchContext searchContext) { - if (!searchContext.hasInnerHits()) { + if (searchContext.hasInnerHits() == false) { return null; } Map innerHits = searchContext.innerHits().getInnerHits(); diff --git a/server/src/main/java/org/opensearch/search/fetch/subphase/ScriptFieldsPhase.java b/server/src/main/java/org/opensearch/search/fetch/subphase/ScriptFieldsPhase.java index ba028c629d18d..bee536dbaf7f6 100644 --- a/server/src/main/java/org/opensearch/search/fetch/subphase/ScriptFieldsPhase.java +++ b/server/src/main/java/org/opensearch/search/fetch/subphase/ScriptFieldsPhase.java @@ -54,7 +54,7 @@ public final class ScriptFieldsPhase implements FetchSubPhase { @Override public FetchSubPhaseProcessor getProcessor(FetchContext context) { - if (!context.hasScriptFields()) { + if (context.hasScriptFields() == false) { return null; } List scriptFields = context.scriptFields().fields();