Fix remaining CS warnings in sal-distributed-datastore
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / ModuleShardBackendResolver.java
index 249cd4524d5d1f2ea1b925008c035e850abb8a5e..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();
                 }
             }
         }
@@ -112,7 +112,7 @@ final class ModuleShardBackendResolver extends BackendInfoResolver<ShardBackendI
             return NULL_FUTURE;
         }
 
-        final CompletableFuture<ShardBackendInfo> ret = new CompletableFuture<ShardBackendInfo>();
+        final CompletableFuture<ShardBackendInfo> ret = new CompletableFuture<>();
 
         FutureConverters.toJava(actorContext.findPrimaryShardAsync(shardName)).thenCompose(info -> {
             LOG.debug("Looking up primary info for {} from {}", shardName, info);
@@ -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);
             }