Add another alternative SchemaContextUtil.findDataSchemaNode() 36/86636/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 30 Dec 2019 08:11:16 +0000 (09:11 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 30 Dec 2019 19:34:48 +0000 (20:34 +0100)
commit6b321f387f45d9a5850224d591d4edbb483eda9a
tree521c91c3386db08f25989ca5e8ae9ef989f323dc
parent47709469cc6bb2bceaffac216c3e271160da365d
Add another alternative SchemaContextUtil.findDataSchemaNode()

We have a number of call sites which are using the XPath variant
of SchemaContextUtil.findDataSchemaNode() in context where the
complexity is not warranted.

Introduce utility methods to migrate those callers to a simplified
version which takes resolved QNames (but does not use SchemaPath),
reducing proliferation of PathExpressionImpl.

JIRA: YANGTOOLS-1060
Change-Id: Id645563733af448f42ecdc62b26205c1a97a2216
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0c48f313a0e06974816cf0d114a83ad1139219b4)
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtil.java
yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtilTest.java
yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionComplexTest.java