From 2cfae7d06d2bf0147210ff1c9f9e47aed2a9a878 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Fri, 15 Sep 2023 12:21:53 -0400 Subject: [PATCH] Fix protocol detection from https system property (#61) Signed-off-by: Andriy Redko --- .../opensearch/index/codec/rest/CreateIndexWithCodecIT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/integrationTest/java/org/opensearch/index/codec/rest/CreateIndexWithCodecIT.java b/src/integrationTest/java/org/opensearch/index/codec/rest/CreateIndexWithCodecIT.java index 34e7537..ba9ca1f 100644 --- a/src/integrationTest/java/org/opensearch/index/codec/rest/CreateIndexWithCodecIT.java +++ b/src/integrationTest/java/org/opensearch/index/codec/rest/CreateIndexWithCodecIT.java @@ -39,6 +39,7 @@ import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.util.Map; +import java.util.Objects; import java.util.Optional; import javax.net.ssl.SSLEngine; @@ -131,7 +132,7 @@ public TlsDetails create(final SSLEngine sslEngine) { @Override protected String getProtocol() { - return Strings.isNullOrEmpty(System.getProperty("https")) ? "http" : "https"; + return Objects.equals(System.getProperty("https"), "true") ? "https" : "http"; } /**