Skip to content

Commit e561f60

Browse files
author
Daan Hoogland
committed
use lambdas in lgging
1 parent 6926718 commit e561f60

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListUsersCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ private boolean isACloudStackUser(String username) {
227227
if (CollectionUtils.isNotEmpty(cloudstackUsers)) {
228228
for (final UserResponse cloudstackUser : cloudstackUsers) {
229229
if (username.equals(cloudstackUser.getUsername())) {
230-
logger.trace("found user {} in cloudstack user {}", username, cloudstackUser.getUsername());
230+
logger.trace("found user {} in cloudstack user {}", username, () -> cloudstackUser.getUsername());
231231
rc = true;
232232
break;
233233
} else {
234-
logger.trace("ldap user {} does not match cloudstack user {}", username, cloudstackUser.getUsername());
234+
logger.trace("ldap user {} does not match cloudstack user {}", username, () -> cloudstackUser.getUsername());
235235
}
236236
}
237237
}

plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapAuthenticator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ Pair<Boolean, ActionOnFailedAuthentication> authenticate(String username, String
283283
if (!ldapUser.isDisabled()) {
284284
result = _ldapManager.canAuthenticate(ldapUser.getPrincipal(), password, domainId);
285285
} else {
286-
logger.debug("user with principal {} is disabled in ldap", ldapUser.getPrincipal());
286+
logger.debug("user with principal {} is disabled in ldap", () -> ldapUser.getPrincipal());
287287
}
288288
} catch (NoLdapUserMatchingQueryException e) {
289289
logger.debug(e.getMessage());

0 commit comments

Comments
 (0)