BUG-4145: check if entire YangInstanceIdentifier is present in SchemaContext 95/26895/1
authorRobert Varga <rovarga@cisco.com>
Sun, 13 Sep 2015 18:47:09 +0000 (20:47 +0200)
committerRobert Varga <rovarga@cisco.com>
Sun, 13 Sep 2015 18:47:09 +0000 (20:47 +0200)
commit13bb06fa8a386783fa4796a8527b033b6d0f0271
treedda8990c3fe0502ace5ee7b42f88f6b1eb5beab6
parent1b654f56585795520966f72cf3ee00d1295f97e0
BUG-4145: check if entire YangInstanceIdentifier is present in SchemaContext

A failure to find the SchemaNode for a path argument results in a
NullPointerException. We need the SchemaNode to understand whether it
targets an augmentation, as those need to be pruned from string output.

This patch improves the behaviour by throwing an
IllegalArgumentException with a description of which component we failed
to find.

Change-Id: I128eb63cf05b278b1af7516d426a6f0bafa87b90
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/AbstractStringInstanceIdentifierCodec.java