From 65fa400339a30671b01a926270b8a98dd2bdd98f Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Thu, 14 Dec 2023 17:14:18 -0500 Subject: [PATCH] Address PR feedback Signed-off-by: Darshit Chanpura --- .../security/tools/democonfig/SecuritySettingsConfigurer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/opensearch/security/tools/democonfig/SecuritySettingsConfigurer.java b/src/main/java/org/opensearch/security/tools/democonfig/SecuritySettingsConfigurer.java index 96bec2bc03..b3644e6c4d 100644 --- a/src/main/java/org/opensearch/security/tools/democonfig/SecuritySettingsConfigurer.java +++ b/src/main/java/org/opensearch/security/tools/democonfig/SecuritySettingsConfigurer.java @@ -132,7 +132,7 @@ void updateAdminPassword() { // Read custom password from environment variable String initialAdminPassword = System.getenv().get(ConfigConstants.OPENSEARCH_INITIAL_ADMIN_PASSWORD); - if (initialAdminPassword != null && !initialAdminPassword.isEmpty()) { + if (!Strings.isNullOrEmpty(initialAdminPassword)) { ADMIN_PASSWORD = initialAdminPassword; }