diff --git a/flint-core/src/main/scala/org/opensearch/flint/core/http/FlintRetryOptions.java b/flint-core/src/main/scala/org/opensearch/flint/core/http/FlintRetryOptions.java index 0def1e3d8..597f441ec 100644 --- a/flint-core/src/main/scala/org/opensearch/flint/core/http/FlintRetryOptions.java +++ b/flint-core/src/main/scala/org/opensearch/flint/core/http/FlintRetryOptions.java @@ -81,7 +81,7 @@ public RetryPolicy getRetryPolicy() { // Logging listener .onFailedAttempt(FlintRetryOptions::onFailure) .onRetry(FlintRetryOptions::onRetry); - if (getServiceName() == SERVICE_NAME_AOSS) { + if (SERVICE_NAME_AOSS.equals(getServiceName())) { builder.handleResultIf(new HttpAOSSResultPredicate<>()); } return builder.build();