diff --git a/ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java b/ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java index 8e89141235..62c4f99e73 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java +++ b/ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java @@ -249,7 +249,9 @@ public class SpringSecurityLdapTemplate extends LdapTemplate { private void extractStringAttributeValues(DirContextAdapter adapter, Map> record, String attributeName) { Object[] values = adapter.getObjectAttributes(attributeName); if (values == null || values.length == 0) { - logger.debug("No attribute value found for '" + attributeName + "'"); + if(logger.isDebugEnabled()) { + logger.debug("No attribute value found for '" + attributeName + "'"); + } return; } List svalues = new ArrayList();