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

Eliminate no-op MandatoryLeafEnforcer

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: