Fix NormalizedNodeStreamWriterStack root handling 11/111411/11
authortobias.pobocik <tobias.pobocik@pantheon.tech>
Thu, 23 May 2024 13:16:28 +0000 (15:16 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 30 May 2024 11:07:53 +0000 (13:07 +0200)
commit33d0cd091722a0d21b99c7c52c8087fa45dc0338
tree6fb87c1822c4233e0c3438a16f85635b6b11ea4a
parent61e505b2fc8feb777eae503bde2c608672282f47
Fix NormalizedNodeStreamWriterStack root handling

When we are attempting to startListEntry(), we really need to be looking
also at the root, as we may have been instantiated at the list itself.

Introduce a dedicated method to return that and use it also when
checking for choices.

JIRA: YANGTOOLS-1575
Change-Id: If4f4afa758d9edd358e9a8e7f1f7665b0156d8b2
Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
codec/yang-data-codec-gson/src/test/java/org/opendaylight/yangtools/yang/data/codec/gson/YT1575Test.java [new file with mode: 0644]
data/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/NormalizedNodeStreamWriterStack.java
data/yang-data-util/src/test/java/org/opendaylight/yangtools/yang/data/util/YT1575Test.java [new file with mode: 0644]