Eliminate unneeded else branch 03/105203/3
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 4 Apr 2023 07:07:34 +0000 (09:07 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 4 Apr 2023 08:19:44 +0000 (08:19 +0000)
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>
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());