Fix SchemaInferenceStack.exitToDataTree() 78/95978/3
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 2 May 2021 14:21:32 +0000 (16:21 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 3 May 2021 09:16:19 +0000 (11:16 +0200)
commitafd966fdabdd62f96e9d062b8904ed24bae4e63c
treef681dfd2d575461bd67771114cf6f37cde2aeaaf
parent0ae668cc926c52d354b562292e4196f9b0c0dea2
Fix SchemaInferenceStack.exitToDataTree()

When we are exiting along data tree axis we need to make sure we skip
any choice/case node hierarchy, so that we arrive at the correct data
tree parent -- even if we arrived via the schema tree.

JIRA: YANGTOOLS-1283
Change-Id: I9d84f59447971fcdfb0cc187e5d2c4a35579bfa6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
model/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaInferenceStack.java
model/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/YT1283Test.java [new file with mode: 0644]
model/yang-model-util/src/test/resources/yt1283.yang [new file with mode: 0644]