Cleanup map iteration in LeafRefValidatation 35/75835/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:08:06 +0000 (10:08 +0000)
commit9100a1727e42387dc2ab075b825fdfa579dd637a
treeda214bc4e8bd89c51f022e37958b98e308e356a9
parentffd8081b45e8579631fea414be90761b57202a7a
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