Fix incorrect statement ordering in augment 34/87634/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 17:25:28 +0000 (18:25 +0100)
commit6d7ec8b9fdf2c724adb43ef7f6e199c7cbd6f2ab
tree61e3e8b2197b2e0111bb21e165d2f65e673caed1
parent5d09f23eac67641a4ed44fdb056c4c51353b334d
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