[YANGTOOLS-1422] Invert SchemaInferenceStack's deque Created: 10/Apr/22  Updated: 13/Jun/22  Resolved: 14/Apr/22

Status: Resolved
Project: yangtools
Component/s: model-util
Affects Version/s: None
Fix Version/s: 9.0.0

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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().


Generated at Wed Feb 07 20:56:07 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.