Reduce code duplication in LibraryModulesSchemas 47/84947/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 23 Aug 2019 14:08:47 +0000 (16:08 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 7 Oct 2019 08:12:51 +0000 (10:12 +0200)
commit24f9babdfe9febed5f96069a86d6c41090bcaad5
tree5386fdaee42836a20a7c00b5d43b2e302a67246e
parent5350d251672a2bdfb8fa57e1e884bb48aa268a7b
Reduce code duplication in LibraryModulesSchemas

The entry derivation code is shared among two cases, merge it
into a utility method.

Also removes a thinko where each entry would actually be created
twice. Furthermore the Optional use for internal utility is removed
in favor of a nullable return.

Change-Id: Ic758eeedf741efb11884eae60ee93d2d510f7360
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 58c3e4ef07ba19406c15ecfaac21856bed94e053)
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/LibraryModulesSchemas.java