Fix InstanceIdentifier.getAncestor() implementations 94/88494/9
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 18 Mar 2020 14:10:37 +0000 (15:10 +0100)
committerRobert Varga <nite@hq.sk>
Thu, 17 Feb 2022 11:04:54 +0000 (11:04 +0000)
commitebaa7f6a56786abd8865b01acc56054d907dcb50
tree71abf2950b3e74db87a9ad3e427f249a8384c6bd
parent9985c8d409f4a141dc3eed2042fb19e0c7d412fc
Fix InstanceIdentifier.getAncestor() implementations

SpotBugs is touchy about nulls here, all of which are guaranteed
to work out due to verification logic -- but that is not quite
obvious. Fix this up by adding explicit verifies -- which do not
hurn that much.

Change-Id: I92a120c9f8d4fced2bf3e8a859772cf6d41798df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/FixedYangInstanceIdentifier.java
data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/StackedYangInstanceIdentifier.java
data/yang-data-api/src/test/java/org/opendaylight/yangtools/yang/data/api/PathArgumentListTest.java