Fix incorrect statement ordering in augment 28/87628/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 12 Feb 2020 16:22:41 +0000 (17:22 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 12 Feb 2020 16:24:37 +0000 (17:24 +0100)
commit4be429126af600d5c8aa5b52bc133e029d9339d2
tree52e89658a2ba49a1b76959b891eef0f266c1754a
parent6785d0c8be6516925ef2dd4784e8469c3dd9ca03
Fix incorrect statement ordering in augment

This is a day-0 bug pointed out by SpotBugs: the increment here is
ineffective, as the Integer is unboxed, incremented and the result
is thrown away -- leading to a dead store and incorrect operation.

Fix this by separating the variables, making it clear what is going
on.

Change-Id: I1393fcdf0e95394fd5a18cf8d843ce2f9e07f898
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