Fix GroupingEffectiveStatementImpl's unknown nodes 70/47170/1
authorRobert Varga <rovarga@cisco.com>
Tue, 18 Oct 2016 14:30:07 +0000 (16:30 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 19 Oct 2016 20:10:05 +0000 (20:10 +0000)
commit97896a806e6a52a89ab385b93a06f180c3d6a529
tree8dfa60d579457f9fd65101df72cfeaf33b3d3263
parent80c95e16025e2531b722edb3c486df75105f013f
Fix GroupingEffectiveStatementImpl's unknown nodes

Heap analysis has pointed out a linked list, which is both
a correctness problem (it should be immutable) and efficiency
issue, as most of the time this list should be empty.

Use ImmutableList.Builder to build an immutable list of
unknown statements.

Change-Id: I94a42cb75d8fa433bcae304728268b0873d14683
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 647eddd0c2c6c2a0e2f68f52f65b7a9b6ee0a53b)
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/GroupingEffectiveStatementImpl.java