Optimize SchemaContextUtil.findParentModule() 35/26535/2
authorRobert Varga <rovarga@cisco.com>
Fri, 4 Sep 2015 17:48:47 +0000 (19:48 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 7 Sep 2015 08:16:43 +0000 (08:16 +0000)
commit32c812ca39a7eb3648372b60e9b950a05e0ee7ad
tree705d0915a7a978dd23ac8c19058dd7a7070d8adc
parent73e422001a659aff1d92ce5c29adbfefd94f1ba2
Optimize SchemaContextUtil.findParentModule()

SchemaPath exposes getLastComponent(), which gives us efficient access
to the last QName in the path. Use it instead of forcing object
instantiation.

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