Clean up TransactionProxy a bit 96/90696/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 25 Jun 2020 13:53:30 +0000 (15:53 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 25 Jun 2020 13:53:30 +0000 (15:53 +0200)
An extra space and a superfluous else block.

Change-Id: I780f099c26ec60340f71054ab6cb31aca05ed441
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java

index 019b0db..b4934e7 100644 (file)
@@ -104,7 +104,7 @@ public class TransactionProxy extends AbstractDOMStoreTransaction<TransactionIde
         requireNonNull(path, "path should not be null");
 
         LOG.trace("Tx {} read {}", getIdentifier(), path);
-        return path.isEmpty() ? readAllData() :  singleShardRead(shardNameFromIdentifier(path), path);
+        return path.isEmpty() ? readAllData() : singleShardRead(shardNameFromIdentifier(path), path);
     }
 
     private FluentFuture<Optional<NormalizedNode<?, ?>>> singleShardRead(
@@ -175,9 +175,8 @@ public class TransactionProxy extends AbstractDOMStoreTransaction<TransactionIde
         if (state == TransactionState.OPEN) {
             state = newState;
             return true;
-        } else {
-            return false;
         }
+        return false;
     }
 
     @Override

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.