From 36b00300f5a9117abb4e8570c1714b3023a0ab01 Mon Sep 17 00:00:00 2001 From: Manikumar Reddy O Date: Wed, 14 Feb 2018 23:23:49 +0530 Subject: [PATCH] MINOR: Update log condition in JassContext.loadServerContext (#4566) --- .../main/java/org/apache/kafka/common/security/JaasContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/src/main/java/org/apache/kafka/common/security/JaasContext.java b/clients/src/main/java/org/apache/kafka/common/security/JaasContext.java index 46db345f1f8..6afed556925 100644 --- a/clients/src/main/java/org/apache/kafka/common/security/JaasContext.java +++ b/clients/src/main/java/org/apache/kafka/common/security/JaasContext.java @@ -65,7 +65,7 @@ public class JaasContext { String globalContextName = GLOBAL_CONTEXT_NAME_SERVER; String listenerContextName = listenerName.value().toLowerCase(Locale.ROOT) + "." + GLOBAL_CONTEXT_NAME_SERVER; Password jaasConfigArgs = (Password) configs.get(mechanism.toLowerCase(Locale.ROOT) + "." + SaslConfigs.SASL_JAAS_CONFIG); - if (jaasConfigArgs == null && configs.containsKey(SaslConfigs.SASL_JAAS_CONFIG)) + if (jaasConfigArgs == null && configs.get(SaslConfigs.SASL_JAAS_CONFIG) != null) LOG.warn("Server config {} should be prefixed with SASL mechanism name, ignoring config", SaslConfigs.SASL_JAAS_CONFIG); return load(Type.SERVER, listenerContextName, globalContextName, jaasConfigArgs); }