Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-882

Cleanup ModificationApplyOperation.verifyStructure confusion

    XMLWordPrintable

Details

    • Improvement
    • Status: Confirmed
    • Medium
    • Resolution: Unresolved
    • None
    • 14.0.0
    • 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)

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: