Rework EffectiveStatementBase statement order restoration 88/85988/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 26 Nov 2019 10:03:27 +0000 (11:03 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 26 Nov 2019 17:44:48 +0000 (18:44 +0100)
commit337a9eb06742549f4e6b218927c894c9c1afc7bf
treebf8ec6bfdcd1bc128696d502260ce5f1f8e7d0c1
parentd352a9158c57eec25df3eea073af6b3ae729733b
Rework EffectiveStatementBase statement order restoration

Rather than relying on mutation of effective substatements when we
are building an effective statements (and thus requiring StmtContext
to be StatementContextBase), use simple filtering to implement
statement ordering.

This limits the scope of mutable state, explains what is going
on and allows use of different StmtContext implementations.

JIRA: YANGTOOLS-1042
Change-Id: I84a2517ef0ce666fbc2f2c6faa3b0d0a43eef6eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 75276bc6d944ff002de8149108d60603349d49c6)
yang/yang-parser-reactor/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/StatementContextBase.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/EffectiveStatementBase.java