diff --git a/native/src/main/java/io/ballerina/lib/ldap/Client.java b/native/src/main/java/io/ballerina/lib/ldap/Client.java index f31c944..4df9bdf 100644 --- a/native/src/main/java/io/ballerina/lib/ldap/Client.java +++ b/native/src/main/java/io/ballerina/lib/ldap/Client.java @@ -114,7 +114,7 @@ public static BError initLdapConnection(BObject ldapClient, BMap secureSocketConfig = (BMap) config .getMapValue(CLIENT_SECURE_SOCKET); try { - if (secureSocketConfig != null && isClientSecurityConfigured(secureSocketConfig)) { + if (Objects.nonNull(secureSocketConfig) && isClientSecurityConfigured(secureSocketConfig)) { SSLConfig sslConfig = populateSSLConfig(secureSocketConfig); AggregateTrustManager trustManager = buildAggregatedTrustManager(sslConfig);