Fix remaining CS warnings in sal-distributed-datastore 99/47499/3
authorTom Pantelis <tpanteli@brocade.com>
Tue, 25 Oct 2016 12:04:08 +0000 (08:04 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 25 Oct 2016 19:12:48 +0000 (19:12 +0000)
Fixed remaining warnings and enabled enforcement. Most of the
warnings/changes were for:
 - white space before beginning brace
 - line too long
 - illegal catching of Exception (suppressed)
 - variable name too short
 - javadoc issues

Change-Id: I5ae5cf9276e0884595137d551a311e8322b2e25e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
21 files changed:
opendaylight/md-sal/sal-distributed-datastore/pom.xml
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractClientHistory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyHistory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientLocalHistory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientTransactionCommitCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/DirectTransactionCommitCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/DistributedDataStoreClient.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/DistributedDataStoreClientActor.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/DistributedDataStoreClientBehavior.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/EmptyTransactionCommitCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/GetClientRequest.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalAbortable.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalProxyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/ModuleShardBackendResolver.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/RemoteProxyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/VotingFuture.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LeaderLocalDelegateFactory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionContextWrapper.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/RegisterChangeListenerReply.java

index b9446330177b68dbcf530d26ff40bdfee657541b..394d3816e276457f0d953a0d9044819530633e49 100644 (file)
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+        </configuration>
+      </plugin>
       <plugin>
         <groupId>org.jacoco</groupId>
         <artifactId>jacoco-maven-plugin</artifactId>
index 593944f08133d6706d30cdec605d389f8dc3f167..b164157982691cdda8095168b7b6432859b2bb0e 100644 (file)
@@ -82,7 +82,7 @@ abstract class AbstractClientHistory extends LocalAbortable implements Identifia
     }
 
     /**
-     * Callback invoked from {@link ClientTransaction} when a transaction has been sub
+     * Callback invoked from {@link ClientTransaction} when a transaction has been submitted.
      *
      * @param transaction Transaction handle
      */
index 9093c080973374c7e9c1959f13ff3065b6d71af3..f21be06f40f754a0e39a3a94eeb818c53a247411 100644 (file)
@@ -33,7 +33,8 @@ abstract class AbstractProxyHistory implements Identifiable<LocalHistoryIdentifi
     static AbstractProxyHistory create(final DistributedDataStoreClientBehavior client,
             final Optional<ShardBackendInfo> backendInfo, final LocalHistoryIdentifier identifier) {
         final Optional<DataTree> dataTree = backendInfo.flatMap(ShardBackendInfo::getDataTree);
-        return dataTree.isPresent() ? new LocalProxyHistory(client, identifier, dataTree.get()) : new RemoteProxyHistory(client, identifier);
+        return dataTree.isPresent() ? new LocalProxyHistory(client, identifier, dataTree.get())
+                : new RemoteProxyHistory(client, identifier);
     }
 
     @Override
@@ -49,6 +50,6 @@ abstract class AbstractProxyHistory implements Identifiable<LocalHistoryIdentifi
         return doCreateTransactionProxy(client, new TransactionIdentifier(identifier, txId.getTransactionId()));
     }
 
-    abstract AbstractProxyTransaction doCreateTransactionProxy(DistributedDataStoreClientBehavior client,
+    abstract AbstractProxyTransaction doCreateTransactionProxy(DistributedDataStoreClientBehavior clientBehavior,
             TransactionIdentifier txId);
 }
index 8ff8b8eff9cb5850d1c7a8bf5c39e408627355a4..cc1651a2edcf33a6ba4779b7bd37038a99db5ea0 100644 (file)
@@ -34,9 +34,11 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 /**
  * Class translating transaction operations towards a particular backend shard.
  *
+ * <p>
  * This class is not safe to access from multiple application threads, as is usual for transactions. Internal state
  * transitions coming from interactions with backend are expected to be thread-safe.
  *
+ * <p>
  * This class interacts with the queueing mechanism in ClientActorBehavior, hence once we arrive at a decision
  * to use either a local or remote implementation, we are stuck with it. We can re-evaluate on the next transaction.
  *
@@ -90,7 +92,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
     }
 
     /**
-     * Seal this transaction before it is either
+     * Seals this transaction when ready.
      */
     final void seal() {
         checkSealed();
@@ -111,6 +113,20 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
         doAbort();
     }
 
+    void abort(final VotingFuture<Void> ret) {
+        checkSealed();
+
+        sendRequest(new TransactionAbortRequest(getIdentifier(), nextSequence(), localActor()), t -> {
+            if (t instanceof TransactionAbortSuccess) {
+                ret.voteYes();
+            } else if (t instanceof RequestFailure) {
+                ret.voteNo(((RequestFailure<?, ?>) t).getCause());
+            } else {
+                ret.voteNo(new IllegalStateException("Unhandled response " + t.getClass()));
+            }
+        });
+    }
+
     /**
      * Commit this transaction, possibly in a coordinated fashion.
      *
@@ -133,20 +149,6 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
         return ret;
     }
 
-    void abort(final VotingFuture<Void> ret) {
-        checkSealed();
-
-        sendRequest(new TransactionAbortRequest(getIdentifier(), nextSequence(), localActor()), t -> {
-            if (t instanceof TransactionAbortSuccess) {
-                ret.voteYes();
-            } else if (t instanceof RequestFailure) {
-                ret.voteNo(((RequestFailure<?, ?>) t).getCause());
-            } else {
-                ret.voteNo(new IllegalStateException("Unhandled response " + t.getClass()));
-            }
-        });
-    }
-
     void canCommit(final VotingFuture<?> ret) {
         checkSealed();
 
@@ -164,7 +166,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
     void preCommit(final VotingFuture<?> ret) {
         checkSealed();
 
-        sendRequest(new TransactionPreCommitRequest(getIdentifier(), nextSequence(), localActor()), t-> {
+        sendRequest(new TransactionPreCommitRequest(getIdentifier(), nextSequence(), localActor()), t -> {
             if (t instanceof TransactionPreCommitSuccess) {
                 ret.voteYes();
             } else if (t instanceof RequestFailure) {
@@ -178,7 +180,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
     void doCommit(final VotingFuture<?> ret) {
         checkSealed();
 
-        sendRequest(new TransactionDoCommitRequest(getIdentifier(), nextSequence(), localActor()), t-> {
+        sendRequest(new TransactionDoCommitRequest(getIdentifier(), nextSequence(), localActor()), t -> {
             if (t instanceof TransactionCommitSuccess) {
                 ret.voteYes();
             } else if (t instanceof RequestFailure) {
@@ -189,6 +191,8 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
         });
     }
 
+    abstract TransactionRequest<?> doCommit(boolean coordinated);
+
     abstract void doDelete(final YangInstanceIdentifier path);
 
     abstract void doMerge(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data);
@@ -197,11 +201,10 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
 
     abstract CheckedFuture<Boolean, ReadFailedException> doExists(final YangInstanceIdentifier path);
 
-    abstract CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> doRead(final YangInstanceIdentifier path);
+    abstract CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> doRead(
+            final YangInstanceIdentifier path);
 
     abstract void doSeal();
 
     abstract void doAbort();
-
-    abstract TransactionRequest<?> doCommit(boolean coordinated);
 }
index be94e3ee6af121abd7eeac3ef1bacc6281072985..807cf98cb73b3dcf5e4841eaf0f4d5b171ac025f 100644 (file)
@@ -18,6 +18,7 @@ import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier
  * Client-side view of a local history. This class tracks all state related to a particular history and routes
  * frontend requests towards the backend.
  *
+ * <p>
  * This interface is used by the world outside of the actor system and in the actor system it is manifested via
  * its client actor. That requires some state transfer with {@link DistributedDataStoreClientBehavior}. In order to
  * reduce request latency, all messages are carbon-copied (and enqueued first) to the client actor.
index e8e75e90e25c148d29ef73a5cf80debc0980ad77..0a1c8be2471102db655b80359f63ebb5faa2cfd2 100644 (file)
@@ -27,22 +27,28 @@ import org.slf4j.LoggerFactory;
 /**
  * Client-side view of a free-standing transaction.
  *
+ * <p>
  * This interface is used by the world outside of the actor system and in the actor system it is manifested via
  * its client actor. That requires some state transfer with {@link DistributedDataStoreClientBehavior}. In order to
  * reduce request latency, all messages are carbon-copied (and enqueued first) to the client actor.
  *
+ * <p>
  * It is internally composed of multiple {@link RemoteProxyTransaction}s, each responsible for a component shard.
  *
+ * <p>
  * Implementation is quite a bit complex, and involves cooperation with {@link AbstractClientHistory} for tracking
  * gaps in transaction identifiers seen by backends.
  *
+ * <p>
  * These gaps need to be accounted for in the transaction setup message sent to a particular backend, so it can verify
  * that the requested transaction is in-sequence. This is critical in ensuring that transactions (which are independent
  * entities from message queueing perspective) do not get reodered -- thus allowing multiple in-flight transactions.
  *
+ * <p>
  * Alternative would be to force visibility by sending an abort request to all potential backends, but that would mean
  * that even empty transactions increase load on all shards -- which would be a scalability issue.
  *
+ * <p>
  * Yet another alternative would be to introduce inter-transaction dependencies to the queueing layer in client actor,
  * but that would require additional indirection and complexity.
  *
index 2521c38f91f497ddf00d217e35278d32638c714a..a7de89aac3e7da504f4010a01eedcda598981597 100644 (file)
@@ -15,9 +15,6 @@ import java.util.List;
 final class ClientTransactionCommitCohort extends AbstractTransactionCommitCohort {
     private final List<AbstractProxyTransaction> proxies;
 
-    /**
-     * @param clientTransaction
-     */
     ClientTransactionCommitCohort(final Collection<AbstractProxyTransaction> proxies) {
         this.proxies = ImmutableList.copyOf(proxies);
     }
@@ -64,4 +61,4 @@ final class ClientTransactionCommitCohort extends AbstractTransactionCommitCohor
 
         return ret;
     }
-}
\ No newline at end of file
+}
index 007ac53d9833105a93da672355ab9e289a22414c..49b281aa3a511bef3b56811ea2f73da2e9a0a443 100644 (file)
@@ -19,9 +19,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 final class DirectTransactionCommitCohort extends AbstractTransactionCommitCohort {
     private final AbstractProxyTransaction proxy;
 
-    /**
-     * @param clientTransaction
-     */
     DirectTransactionCommitCohort(final AbstractProxyTransaction proxy) {
         this.proxy = Preconditions.checkNotNull(proxy);
     }
index 0d22d564fe4270830668c56929013e4f67a2840b..273fd89919848a824b3945b03617ca7c07cf76ee 100644 (file)
@@ -16,6 +16,7 @@ import org.opendaylight.yangtools.concepts.Identifiable;
  * Client interface for interacting with the frontend actor. This interface is the primary access point through
  * which the DistributedDataStore frontend interacts with backend Shards.
  *
+ * <p>
  * Keep this interface as clean as possible, as it needs to be implemented in thread-safe and highly-efficient manner.
  *
  * @author Robert Varga
index de2c19572c1bdec1ae03b510000a5fa3ea5c3591..45875baa150682e01a7bc3bc6e5a6d6404c46ada 100644 (file)
@@ -45,14 +45,16 @@ public final class DistributedDataStoreClientActor extends AbstractClientActor {
         return new DistributedDataStoreClientBehavior(context, actorContext);
     }
 
-    public static Props props(final @Nonnull MemberName memberName, @Nonnull final String storeName, final ActorContext ctx) {
+    public static Props props(@Nonnull final MemberName memberName, @Nonnull final String storeName,
+            final ActorContext ctx) {
         final String name = "datastore-" + storeName;
         final FrontendIdentifier frontendId = FrontendIdentifier.create(memberName, FrontendType.forName(name));
         return Props.create(DistributedDataStoreClientActor.class,
             () -> new DistributedDataStoreClientActor(frontendId, ctx));
     }
 
-    public static DistributedDataStoreClient getDistributedDataStoreClient(final @Nonnull ActorRef actor,
+    @SuppressWarnings("checkstyle:IllegalCatch")
+    public static DistributedDataStoreClient getDistributedDataStoreClient(@Nonnull final ActorRef actor,
             final long timeout, final TimeUnit unit) {
         try {
             return (DistributedDataStoreClient) Await.result(ExplicitAsk.ask(actor, GET_CLIENT_FACTORY,
index e3e781e4db8eb0d75488b29059ab555b37afa125..eb1dd17bfd9438fc6adff5351db71527d90b3453 100644 (file)
@@ -29,21 +29,26 @@ import org.slf4j.LoggerFactory;
  * {@link ClientActorBehavior} acting as an intermediary between the backend actors and the DistributedDataStore
  * frontend.
  *
+ * <p>
  * This class is not visible outside of this package because it breaks the actor containment. Services provided to
  * Java world outside of actor containment are captured in {@link DistributedDataStoreClient}.
  *
+ * <p>
  * IMPORTANT: this class breaks actor containment via methods implementing {@link DistributedDataStoreClient} contract.
  *            When touching internal state, be mindful of the execution context from which execution context, Actor
  *            or POJO, is the state being accessed or modified.
  *
+ * <p>
  * THREAD SAFETY: this class must always be kept thread-safe, so that both the Actor System thread and the application
  *                threads can run concurrently. All state transitions must be made in a thread-safe manner. When in
  *                doubt, feel free to synchronize on this object.
  *
+ * <p>
  * PERFORMANCE: this class lies in a performance-critical fast path. All code needs to be concise and efficient, but
  *              performance must not come at the price of correctness. Any optimizations need to be carefully analyzed
  *              for correctness and performance impact.
  *
+ * <p>
  * TRADE-OFFS: part of the functionality runs in application threads without switching contexts, which makes it ideal
  *             for performing work and charging applications for it. That has two positive effects:
  *             - CPU usage is distributed across applications, minimizing work done in the actor thread
@@ -123,6 +128,7 @@ final class DistributedDataStoreClientBehavior extends ClientActorBehavior imple
     //
     //
 
+    @SuppressWarnings("checkstyle:IllegalCatch")
     private static <K, V extends LocalAbortable> V returnIfOperational(final Map<K , V> map, final K key, final V value,
             final Throwable aborted) {
         Verify.verify(map.put(key, value) == null);
index 7032660068319d7f14632f42d9388cccac321f33..0884ed4a11c7c15476031750a43a933a43d03a4f 100644 (file)
@@ -14,6 +14,7 @@ import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCoh
  * An {@link AbstractTransactionCommitCohort} for use with empty transactions. This relies on the fact that no backends
  * have been touched, hence all state book-keeping needs to happen only locally and shares fate with the coordinator.
  *
+ * <p>
  * Therefore all methods can finish immediately without any effects.
  *
  * @author Robert Varga
index 4bfd1c4a601ef92d9b531c41e7d6c320efa56d43..2b6785496ebee2b7e2d4b78e7a5beb71d3cc2469 100644 (file)
@@ -18,11 +18,11 @@ import com.google.common.base.Preconditions;
 final class GetClientRequest {
     private final ActorRef replyTo;
 
-    public GetClientRequest(final ActorRef replyTo) {
+    GetClientRequest(final ActorRef replyTo) {
         this.replyTo = Preconditions.checkNotNull(replyTo);
     }
 
     ActorRef getReplyTo() {
         return replyTo;
     }
-}
\ No newline at end of file
+}
index 5b0708f120aec2c3d5c6b543df7f3b26c0ec20b7..a6d86de0147cc4bb5a347670fe53041443e3c24d 100644 (file)
@@ -11,6 +11,7 @@ package org.opendaylight.controller.cluster.databroker.actors.dds;
  * Common interface for client histories and client transactions, which can be aborted immediately without replicating
  * the effect to the backend. This is needed for abrupt shutdowns.
  *
+ * <p>
  * Since classes which need to expose this functionality do not need a base class, this is an abstract class and not
  * an interface -- which allows us to not leak the {@link #localAbort(Throwable)} method.
  *
index b5eadb5abe4b69dc58bced6621bc0a6da03d2f35..576fa67ed467afc05fe871c1db424aa2a45eca17 100644 (file)
@@ -29,10 +29,12 @@ import org.slf4j.LoggerFactory;
  * An {@link AbstractProxyTransaction} for dispatching a transaction towards a shard leader which is co-located with
  * the client instance.
  *
+ * <p>
  * It requires a {@link DataTreeSnapshot}, which is used to instantiated a new {@link DataTreeModification}. Operations
  * are then performed on this modification and once the transaction is submitted, the modification is sent to the shard
  * leader.
  *
+ * <p>
  * This class is not thread-safe as usual with transactions. Since it does not interact with the backend until the
  * transaction is submitted, at which point this class gets out of the picture, this is not a cause for concern.
  *
index 495681cfdf2f25e228136d73f91146c80a71d98a..de115f06638878a343499a9f72d071324e1827e9 100644 (file)
@@ -93,10 +93,10 @@ final class ModuleShardBackendResolver extends BackendInfoResolver<ShardBackendI
                 if (cookie == null) {
                     cookie = nextShard++;
 
-                    Builder<String, Long> b = ImmutableBiMap.builder();
-                    b.putAll(shards);
-                    b.put(shardName, cookie);
-                    shards = b.build();
+                    Builder<String, Long> builder = ImmutableBiMap.builder();
+                    builder.putAll(shards);
+                    builder.put(shardName, cookie);
+                    shards = builder.build();
                 }
             }
         }
@@ -132,9 +132,9 @@ final class ModuleShardBackendResolver extends BackendInfoResolver<ShardBackendI
             return new ShardBackendInfo(success.getBackend(),
                 nextSessionId.getAndIncrement(), success.getVersion(), shardName, UnsignedLong.fromLongBits(cookie),
                 success.getDataTree(), success.getMaxMessages());
-        }).whenComplete((info, t) -> {
-            if (t != null) {
-                ret.completeExceptionally(t);
+        }).whenComplete((info, throwablw) -> {
+            if (throwablw != null) {
+                ret.completeExceptionally(throwablw);
             } else {
                 ret.complete(info);
             }
index bb21223aabe163847547100b3025f49848344d61..26d718def5d267381f1ae1b5a0879fce7a2ca6e6 100644 (file)
@@ -39,9 +39,11 @@ import org.slf4j.LoggerFactory;
  * An {@link AbstractProxyTransaction} for dispatching a transaction towards a shard leader whose location is currently
  * not known or is known to be not co-located with the client.
  *
+ * <p>
  * It packages operations and sends them via the client actor queue to the shard leader. That queue is responsible for
  * maintaining any submitted operations until the leader is discovered.
  *
+ * <p>
  * This class is not safe to access from multiple application threads, as is usual for transactions. Its internal state
  * transitions based on backend responses are thread-safe.
  *
@@ -193,7 +195,8 @@ final class RemoteProxyTransaction extends AbstractProxyTransaction {
         }
     }
 
-    private void completeRead(final SettableFuture<Optional<NormalizedNode<?, ?>>> future, final Response<?, ?> response) {
+    private void completeRead(final SettableFuture<Optional<NormalizedNode<?, ?>>> future,
+            final Response<?, ?> response) {
         LOG.debug("Read request completed with {}", response);
 
         if (response instanceof ReadTransactionSuccess) {
index b6aba31e50982bc47d679189ea3f017cad9e2724..01298dfabfcef1c37e0eaeb0e8ded68a6e975b68 100644 (file)
@@ -22,6 +22,7 @@ import javax.annotation.concurrent.GuardedBy;
  * an exception. This exception corresponds to the cause reported by the first 'no' vote, with all subsequent votes
  * added as suppressed exceptions.
  *
+ * <p>
  * Implementation is geared toward positive votes. Negative votes have to synchronize and therefore are more likely
  * to see contention.
  *
@@ -53,7 +54,7 @@ class VotingFuture<T> extends AbstractFuture<T> {
         if (castVote()) {
             synchronized (failures) {
                 resolveResult();
-             }
+            }
         }
     }
 
index 8e22d5f9e720553bf85878f7d3e5bde30c566543..fbd974a1da8bb8777721944914b153230bbe954b 100644 (file)
@@ -64,5 +64,6 @@ abstract class LeaderLocalDelegateFactory<M, D, I> extends DelegateFactory<M, D,
      * @param hasLeader true if the shard knows about leader ID
      */
     abstract void onLeadershipChange(boolean isLeader, boolean hasLeader);
+
     abstract void onMessage(M message, boolean isLeader, boolean hasLeader);
 }
index 6dae7cec31b9b533d95500b528c52ae0da8a71c5..3fb129f3817f75b7388a335458e4b67b4c8aca09 100644 (file)
@@ -109,13 +109,13 @@ class TransactionContextWrapper {
             // in case a TransactionOperation results in another transaction operation being
             // queued (eg a put operation from a client read Future callback that is notified
             // synchronously).
-            Collection<TransactionOperation> operationsBatch = null;
+            final Collection<TransactionOperation> operationsBatch;
             synchronized (queuedTxOperations) {
                 if (queuedTxOperations.isEmpty()) {
                     // We're done invoking the TransactionOperations so we can now publish the
                     // TransactionContext.
                     localTransactionContext.operationHandOffComplete();
-                    if (!localTransactionContext.usesOperationLimiting()){
+                    if (!localTransactionContext.usesOperationLimiting()) {
                         limiter.releaseAll();
                     }
                     transactionContext = localTransactionContext;
index cc594ca2004f1831568e645e941e517ecb1d43f4..f7031e4e379e7954dc728122baf763abd7469098 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.controller.cluster.datastore.messages;
 import akka.actor.ActorPath;
 import akka.actor.ActorRef;
 
-public class RegisterChangeListenerReply{
+public class RegisterChangeListenerReply {
     private final ActorRef listenerRegistration;
 
     public RegisterChangeListenerReply(final ActorRef listenerRegistration) {