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

Invert SchemaInferenceStack's deque

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Medium Medium
    • 9.0.0
    • None
    • model-util
    • None

      SchemaTreeInferenceStack.deque is currently being used as a stack, with push()/pop() being the predominant operations. This leads to the deque being organized on the opposite direction of statement tree and therefore we need to be careful not to use it a Collection and instead use descendingIterator() when interfacing with other constructs.

      Invert the ordering of the deque, so that its iterator() order matches the path from root. This will improve interoperability with other constructs, improve debugging experience and allow us to use things like ImmutableList.copyOf()/Collection.addAll().

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

              Created:
              Updated:
              Resolved: