else
{
String encodedPassword = password;
if (upcpm != null && upcpm.getCredentialPasswordEncoder() != null && credential.isEncoded())
{
CredentialPasswordEncoder encoder = upcpm.getCredentialPasswordEncoder();
if (upcpm.getCredentialPasswordEncoder() instanceof AlgorithmUpgradeCredentialPasswordEncoder)
{
encodedPassword = ((AlgorithmUpgradeCredentialPasswordEncoder)encoder).encode(credential, password);
}
else
{
encodedPassword = encoder.encode(userName, password);
}
}
if (!credential.getPassword().equals(encodedPassword))
{
setPassword = true;