Cleanup map iteration in LeafRefValidatation 34/75834/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 7 Sep 2018 09:07:09 +0000 (11:07 +0200)
committerRobert Varga <nite@hq.sk>
Fri, 7 Sep 2018 10:07:52 +0000 (10:07 +0000)
commitba99ac3e338845343ffee7724e453f41469d9486
tree3658b1e3c5b7cc9edc3b39f56892d07935839dec
parent408a9568d92a6761a64cdf8aebb4ab55843a7a45
Cleanup map iteration in LeafRefValidatation

We have two codepaths for non-filtered and filtered map entry case,
which end up iterating over map entries. Rewrite the code in terms
of an optionally-filtered stream, reducing code duplication.

JIRA: YANGTOOLS-892
Change-Id: I3ca37edb66373cc5ab4632210980cd4a467fd198
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/leafref/LeafRefValidatation.java