if (logger.isLoggable(BasicLevel.ERROR))
logger.log(BasicLevel.ERROR, "User [" + identity.getUserName() + "] does not exist");
throw new Exception("User [" + identity.getUserName() + "] does not exist");
}
if (!userIdentity.check(identity)) {
if (logger.isLoggable(BasicLevel.ERROR))
logger.log(BasicLevel.ERROR, "identity check failed.");
throw new Exception("identity check failed.");
}