Add a condition update precaution to validateNewState (#1920)

This commit is contained in:
Pavlo Tkach 2023-01-25 14:53:12 -05:00 committed by GitHub
parent c71a3312ab
commit 5a3aa9fa52

View file

@ -307,6 +307,13 @@ public final class DomainUpdateFlow implements TransactionalFlow {
}
}
/**
* Checks whether the new state of the domain is valid.
*
* <p>Note: Before adding or amending conditions, existing data has to be verified for being
* compliant with the additions or amendments, otherwise existing data can become invalid and
* cause Domain update failure.
*/
private void validateNewState(Domain newDomain) throws EppException {
validateRequiredContactsPresent(newDomain.getRegistrant(), newDomain.getContacts());
validateDsData(newDomain.getDsData());