Eliminate unneeded else branch 10/105410/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 4 Apr 2023 07:07:34 +0000 (09:07 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 12 Apr 2023 09:36:44 +0000 (11:36 +0200)
Eclipse is right to point out we can just ditch the else branch.

Change-Id: I816dd9a34b6fd8e1272ad1b8b93c2c5b3120ed4b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1a9684ec6ce9dae26b3292028f6a2b3fa5d61cc4)

opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java

index c4bbe5b411885f8de4c15a189081c7baedad9c4e..226dd0c8698bde296ab91e82184939b758defbaa 100644 (file)
@@ -1336,9 +1336,9 @@ public class ShardDataTree extends ShardDataTreeTransactionParent {
                 }
 
                 return true;
-            } else {
-                newTip = requireNonNullElse(e.cohort.getCandidate(), newTip);
             }
+
+            newTip = requireNonNullElse(e.cohort.getCandidate(), newTip);
         }
 
         LOG.debug("{}: aborted transaction {} not found in the queue", logContext, cohort.getIdentifier());