Fix password empty check
@@ -120,7 +120,7 @@ public class ServicePasswordCallbackHandler implements CallbackHandler {
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug("Error when authenticating user : " + username + ", password provided : "
- + (StringUtils.isEmpty(receivedPasswd)), e);
+ + StringUtils.isNotEmpty(receivedPasswd), e);
}
throw new UnsupportedCallbackException(callbacks[i],
"Check failed : System error");
@@ -170,7 +170,7 @@ public class ServicePasswordCallbackHandler implements CallbackHandler {
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug("Error when authenticating user : " + username + ", password provided : "
- + (StringUtils.isEmpty(receivedPasswd)), e);
+ + StringUtils.isNotEmpty(receivedPasswd), e);
}
throw new UnsupportedCallbackException(callbacks[i], "Check failed : System error");
}
@@ -245,7 +245,7 @@ public class ServicePasswordCallbackHandler implements CallbackHandler {
boolean isAuthorized = false;
try {
- // verify whether user is in same tenant that service has been deployed.
+ // Verify whether user is in same tenant that service has been deployed.
if (realm.getUserStoreManager().getTenantId() !=
SecurityServiceHolder.getRealmService().getTenantManager().getTenantId(MultitenantUtils.getTenantDomain(user))) {
if (log.isDebugEnabled()) {
