Cleanup map iteration in LeafRefValidatation 30/75830/3
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 7 Sep 2018 09:07:09 +0000 (11:07 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 7 Sep 2018 09:34:41 +0000 (11:34 +0200)
commit32653e9bae074b5b4e43b2a8da78d0bd83b5e8ee
tree87db5f3dfef15149033706787332348c86adf761
parentbf2d22d26533e9bc5819540b911b13e6a1bed9c8
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