Correct InstanceIdentifier.trustedCreate() 76/104976/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 21 Mar 2023 15:24:31 +0000 (16:24 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 21 Mar 2023 16:40:09 +0000 (17:40 +0100)
commit2cb72f53bee4699dc32c004810d05b2187aed1e9
tree27dd1c9676e8822e046f1cba48838db4b3f77a34
parent5b45057b26a4c86487f569b940f553c977cb3798
Correct InstanceIdentifier.trustedCreate()

The check for wildcard is not correct: we should just consider the last
item when deciding to create a KeyedInstanceIdentifier. Add an explicit
test and fix the checks.

JIRA: MDSAL-818
Change-Id: Ic6fedca7e182eaf0d983e3e39b49dd75d01f8ae8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-test-model/src/test/java/org/opendaylight/mdsal/binding/test/model/Mdsal818Test.java [new file with mode: 0644]
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifier.java