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

Eliminate no-op MandatoryLeafEnforcer

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 3.0.0, 2.0.17, 2.1.9
    • data-impl
    • None

    Description

      We are currently always wrapping ContainerModificationStrategy with an enforcer, even when that enforcer does nothing. The same applies to ListEntryModificationStrategy.

      Improve the situation by only wrapping when an enforcer is actually needed – hence we either use stock methods, or run an enforcer inbetween. This has the benefit of making MandatoryLeafEnforcer a singleton implementation, allowing it to be perfectly inlined.

      It also means that most of the time we will not encounter an overridden SchemaAwareApplyOperation method, simply because mandatory leaves are not that prevalent.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: