/** * {@inheritDoc} */ @Override public KrbIdentity updateIdentity(KrbIdentity identity) throws KrbException { if (identity == null) { throw new IllegalArgumentException("null identity to update"); } if (doGetIdentity(identity.getPrincipalName()) == null) { logger.error("Error occurred while updating identity, principal " + identity.getPrincipalName() + " does not exists."); throw new KrbException("Principal does not exist."); } KrbIdentity updated = doUpdateIdentity(identity); logger.debug("updateIdentity {}, principalName = {}", (updated != null ? "successful" : "failed"), identity.getPrincipalName()); return updated; }
/** * {@inheritDoc} */ @Override public KrbIdentity updateIdentity(KrbIdentity identity) throws KrbException { if (identity == null) { throw new IllegalArgumentException("null identity to update"); } if (doGetIdentity(identity.getPrincipalName()) == null) { logger.error("Error occurred while updating identity, principal " + identity.getPrincipalName() + " does not exists."); throw new KrbException("Principal does not exist."); } KrbIdentity updated = doUpdateIdentity(identity); logger.debug("updateIdentity {}, principalName = {}", (updated != null ? "successful" : "failed"), identity.getPrincipalName()); return updated; }