BUG-8494: fix failure path thinko 48/59848/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 27 Jun 2017 14:53:09 +0000 (16:53 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 3 Jul 2017 11:08:18 +0000 (11:08 +0000)
The check should be to see if the failure has *not* been set,
hence invert the check.

Change-Id: I2c3893924f1c985687beedbfae0889388fad15c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5e986f5320c561953759a7beffb11db7e296817c)

opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/AbstractTransactionHandler.java

index f23e7ec194b77e02c205def4e54cca003ffb27ba..250b3b30e9c49e1a4c5083ea29e0876aeb9c9aaf 100644 (file)
@@ -53,7 +53,7 @@ abstract class AbstractTransactionHandler {
         @Override
         void txFailure(final ListenableFuture<Void> execFuture, final long txId, final Throwable cause) {
             futures.remove(execFuture);
-            if (failure != null) {
+            if (failure == null) {
                 failure = cause;
             }
         }