Simplify SchemaContextUtil.findParentModule() 29/94929/3
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 1 Feb 2021 10:41:30 +0000 (11:41 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 1 Feb 2021 11:04:13 +0000 (12:04 +0100)
commitac65377c181433fa9015b4e5e254d725bf671a3f
tree248927b4bbc72df39356a26bae818325c154919f
parentc4b20223f450981308a1457a1a55ce550fbe715a
Simplify SchemaContextUtil.findParentModule()

We are going through SchemaNode.getPath() only to acquire the last
component -- this is equivalent to SchemaNode.getQName(), so use
that.

Change-Id: I206d9cbdf9932f8ef4eb102eb2fa88660460aca3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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