Optimize augment conflict checking 16/69216/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 7 Mar 2018 16:32:30 +0000 (17:32 +0100)
committerRobert Varga <nite@hq.sk>
Wed, 7 Mar 2018 17:58:56 +0000 (17:58 +0000)
commit6e4ed947d08856771dbbdf428ba84c44aed45126
treebc9cc7fccb8811b4b1dc89b34d08b1ad7828b6f5
parentc003b42d9ba4ef9176b5b8e795731f2693e16c55
Optimize augment conflict checking

When we are validating whether a node can be introduced, we end up
needlessly iterating when the source is not a DataDefinitionStatement
and also end up running comparison when a substatement is not a
DataDefinitionStatement,

Refactor the code to take these invariants into account.

Change-Id: Ie55c7dfebacfad1189de1929c23809fd284958b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/augment/AbstractAugmentStatementSupport.java