private void postProcessPasswordCredentialPolicy(SecurityPolicyType securityPolicyType, PasswordCredentialsPolicyType passwd, Task task, OperationResult result) {
Integer passwordHistoryLength = passwd.getPasswordHistoryLength();
if (passwordHistoryLength != null && passwd.getHistoryLength() == null) {
passwd.setHistoryLength(passwordHistoryLength);
}
ObjectReferenceType passwordPolicyRef = passwd.getPasswordPolicyRef();
if (passwordPolicyRef != null && passwd.getValuePolicyRef() == null) {
passwd.setValuePolicyRef(passwordPolicyRef.clone());
}
ValuePolicyType valuePolicyType = postProcessCredentialPolicy(securityPolicyType, passwd, "password credential policy", task, result);
if (valuePolicyType != null) {
setDeprecatedPasswordPolicyProperties(valuePolicyType, passwd);
}
}