Details
-
Improvement
-
Status: Confirmed
-
Medium
-
Resolution: Unresolved
-
None
-
None
-
None
Description
ModificationApplyOperation.verifyStructure() has a slightly unclear contract and has an unclear relationship with ModificationApplyOperation.recursivelyVerifyStructure().
There are two things that need to happen:
- verifyChildren=true needs to be split into a new method, which will throw a checked exception
- recursivelyVerifyStructure() needs to have its contract documented
For reasoning see:
- AbstractNodeContainerModificationStrategy implementation of both methods – which share majority of the code
- MinMaxElementsValidation and MandatoryLeafEnforcer.enforceOnData() callers, who could use the ability to report a DataValidationFailedException (and requisite context where we are in the data tree)