Reduce code duplication in LibraryModulesSchemas 36/83936/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 23 Aug 2019 14:08:47 +0000 (16:08 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 23 Aug 2019 14:39:02 +0000 (16:39 +0200)
commit58c3e4ef07ba19406c15ecfaac21856bed94e053
tree1d330ca000ba66088b610cae1ec6e60290c94ee0
parent5ccb3a1da73f968d3c95228e6c109ca032d2bf2b
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>
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/LibraryModulesSchemas.java