SEC-2690: Add guard around debug statement

This commit is contained in:
Rob Winch 2014-07-28 12:27:40 -05:00
parent 0f6235bbe0
commit 4a633a938a
1 changed files with 3 additions and 1 deletions

View File

@ -249,7 +249,9 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
private void extractStringAttributeValues(DirContextAdapter adapter, Map<String, List<String>> 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<String> svalues = new ArrayList<String>();