This is an automated email from the ASF dual-hosted git repository.

namelchev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 5f7290a53da IGNITE-23558 Minor code cleanup. (#11555)
5f7290a53da is described below

commit 5f7290a53dad2e29dd5770f7b42f7c6deac46f02
Author: Vladimir Steshin <[email protected]>
AuthorDate: Wed Oct 30 18:24:32 2024 +0300

    IGNITE-23558 Minor code cleanup. (#11555)
---
 .../processors/query/calcite/RootQuery.java        |   2 +-
 .../query/calcite/prepare/PlannerHelper.java       |   2 +-
 .../commandline/CommandHandlerParsingTest.java     |   2 +-
 .../ignite/internal/cluster/IgniteClusterImpl.java |   8 +-
 .../cache/VerifyBackupPartitionsTaskV2.java        |   1 +
 .../managers/communication/GridIoManager.java      |   2 +-
 .../snapshot/IgniteSnapshotManager.java            |   3 +-
 .../snapshot/SnapshotFilesRequestMessage.java      |  12 +-
 .../cache/persistence/snapshot/dump/Dump.java      |   2 +-
 .../datastructures/DataStructuresProcessor.java    |   6 +-
 .../stat/IgniteStatisticsConfigurationManager.java |   2 +-
 .../query/stat/IgniteStatisticsHelper.java         |  12 +-
 .../query/stat/IgniteStatisticsManagerImpl.java    |  10 +-
 .../query/stat/StatisticsUsageState.java           |   4 +-
 .../query/stat/task/GatherPartitionStatistics.java |   3 +-
 .../processors/task/GridTaskProcessor.java         |   3 +-
 .../internal/util/distributed/InitMessage.java     |  10 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java       |  14 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java       | 149 +++++++++++++--------
 .../distributed/OnePhaseCommitAndNodeLeftTest.java |   2 +-
 ...lanceIsProcessingWhenAssignmentIsEmptyTest.java |   2 +-
 ...yPartitionHistoricallyWithReorderedUpdates.java |   2 +-
 .../db/wal/IgniteWalRebalanceLoggingTest.java      |   2 +-
 ...cpClientDiscoverySpiFailureTimeoutSelfTest.java |   2 +-
 .../tcp/TcpDiscoveryClientSuspensionSelfTest.java  |   2 +-
 .../query/h2/TableStatisticsAbstractTest.java      |   2 +-
 .../query/stat/StatisticsObsolescenceTest.java     |   2 +-
 27 files changed, 150 insertions(+), 113 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
index 242e355d22c..d760ac16ba9 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java
@@ -276,7 +276,7 @@ public class RootQuery<RowT> extends Query<RowT> implements 
TrackableQuery {
                 }
 
                 if (wrpEx != null)
-                    log.warning("An exception occures during the query 
cancel", wrpEx);
+                    log.warning("An exception occurs during the query cancel", 
wrpEx);
             }
             finally {
                 super.tryClose(failure == null && root != null ? 
root.failure() : failure);
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlannerHelper.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlannerHelper.java
index 7618793255f..1226de98ba2 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlannerHelper.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlannerHelper.java
@@ -254,7 +254,7 @@ public class PlannerHelper {
         /**
          * Process a scan node and raise a {@link #spoolNeeded flag} if needed.
          *
-         * @param scan TableScan to analize.
+         * @param scan TableScan to analyze.
          * @return The input rel.
          */
         private IgniteRel processScan(TableScan scan) {
diff --git 
a/modules/control-utility/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java
 
b/modules/control-utility/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java
index ba4bb926417..0a0519512da 100644
--- 
a/modules/control-utility/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java
+++ 
b/modules/control-utility/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java
@@ -419,7 +419,7 @@ public class CommandHandlerParsingTest {
     }
 
     /**
-     * Tets checks a parser of shutdown policy command.
+     * Tests checks a parser of shutdown policy command.
      */
     @Test
     public void testParseShutdownPolicyParameters() {
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java
index b64762891df..e37491eb763 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java
@@ -49,7 +49,6 @@ import org.apache.ignite.cluster.ClusterGroupEmptyException;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.cluster.ClusterStartNodeResult;
 import org.apache.ignite.cluster.ClusterState;
-import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.IgniteComponentType;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -90,13 +89,10 @@ import static 
org.apache.ignite.plugin.security.SecurityPermission.ADMIN_CLUSTER
 /**
  *
  */
-public class IgniteClusterImpl extends ClusterGroupAdapter implements 
IgniteClusterEx, Externalizable {
+public class IgniteClusterImpl extends ClusterGroupAdapter implements 
IgniteClusterEx {
     /** */
     private static final long serialVersionUID = 0L;
 
-    /** */
-    private IgniteConfiguration cfg;
-
     /** Node local store. */
     @GridToStringExclude
     private ConcurrentMap nodeLoc;
@@ -141,8 +137,6 @@ public class IgniteClusterImpl extends ClusterGroupAdapter 
implements IgniteClus
     public IgniteClusterImpl(GridKernalContext ctx) {
         super(ctx, (IgnitePredicate<ClusterNode>)null);
 
-        cfg = ctx.config();
-
         nodeLoc = new ClusterNodeLocalMapImpl(ctx);
 
         log = ctx.log(getClass());
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java
index 5d2dabdb9e0..410eeb96d08 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java
@@ -63,6 +63,7 @@ import org.apache.ignite.resources.IgniteInstanceResource;
 import org.apache.ignite.resources.LoggerResource;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+
 import static java.util.Collections.emptyMap;
 import static org.apache.ignite.internal.pagemem.PageIdAllocator.FLAG_DATA;
 import static 
org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.GRID_NOT_IDLE_MSG;
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index 2e721239ced..7a9c0b6dd64 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -2775,7 +2775,7 @@ public class GridIoManager extends 
GridManagerAdapter<CommunicationSpi<Serializa
      * @param rctx Receiver context to use.
      * @param ex Exception to close receiver with.
      */
-    private void interruptReceiver(ReceiverContext rctx, Exception ex) {
+    private void interruptReceiver(@Nullable ReceiverContext rctx, Exception 
ex) {
         if (rctx == null)
             return;
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
index 9c8404218e2..32a981f50bc 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
@@ -2595,7 +2595,8 @@ public class IgniteSnapshotManager extends 
GridCacheSharedManagerAdapter
      * @return Iterator over partition.
      * @throws IgniteCheckedException If and error occurs.
      */
-    public GridCloseableIterator<CacheDataRow> 
partitionRowIterator(GridKernalContext ctx,
+    public GridCloseableIterator<CacheDataRow> partitionRowIterator(
+        GridKernalContext ctx,
         String grpName,
         int partId,
         FilePageStore pageStore
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFilesRequestMessage.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFilesRequestMessage.java
index 56c882b455e..e168914e712 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFilesRequestMessage.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFilesRequestMessage.java
@@ -66,24 +66,24 @@ public class SnapshotFilesRequestMessage extends 
AbstractSnapshotMessage {
     }
 
     /**
-     * @param reqId Unique message id.
-     * @param requestId Snapshot operation request ID.
+     * @param msgId Unique message id.
+     * @param reqId Snapshot operation request ID.
      * @param snpName Snapshot name to request.
      * @param snpPath Snapshot directory path.
      * @param parts Map of cache group ids and corresponding set of its 
partition ids to be snapshot.
      */
     public SnapshotFilesRequestMessage(
-        String reqId,
-        UUID requestId,
+        String msgId,
+        UUID reqId,
         String snpName,
         @Nullable String snpPath,
         Map<Integer, Set<Integer>> parts
     ) {
-        super(reqId);
+        super(msgId);
 
         assert parts != null && !parts.isEmpty();
 
-        this.reqId = requestId;
+        this.reqId = reqId;
         this.snpName = snpName;
         this.snpPath = snpPath;
         this.parts = new HashMap<>();
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java
index 7cefa552380..60dc42ce977 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java
@@ -199,7 +199,7 @@ public class Dump implements AutoCloseable {
     }
 
     /** @return List of snapshot metadata saved in {@link #dumpDir}. */
-    public List<SnapshotMetadata> metadata() throws IOException, 
IgniteCheckedException {
+    public List<SnapshotMetadata> metadata() {
         return Collections.unmodifiableList(metadata);
     }
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
index 0428e7a77e8..00d333ef86f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
@@ -349,9 +349,10 @@ public final class DataStructuresProcessor extends 
GridProcessorAdapter implemen
 
     /** {@inheritDoc} */
     @Override public void onActivate(GridKernalContext ctx) {
-        if (log.isDebugEnabled())
+        if (log.isDebugEnabled()) {
             log.debug("Activating data structure processor [nodeId=" + 
ctx.localNodeId() +
                 " topVer=" + ctx.discovery().topologyVersionEx() + " ]");
+        }
 
         initFailed = false;
 
@@ -466,9 +467,10 @@ public final class DataStructuresProcessor extends 
GridProcessorAdapter implemen
 
     /** {@inheritDoc} */
     @Override public void onDeActivate(GridKernalContext ctx) {
-        if (log.isDebugEnabled())
+        if (log.isDebugEnabled()) {
             log.debug("DeActivate data structure processor [nodeId=" + 
ctx.localNodeId() +
                 ", topVer=" + ctx.discovery().topologyVersionEx() + "]");
+        }
 
         ctx.event().removeLocalEventListener(lsnr, EVT_NODE_LEFT, 
EVT_NODE_FAILED);
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsConfigurationManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsConfigurationManager.java
index d5099b72908..2ad221bea92 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsConfigurationManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsConfigurationManager.java
@@ -126,7 +126,7 @@ public class IgniteStatisticsConfigurationManager {
                 distrMetaStorage.listen(
                     (metaKey) -> metaKey.startsWith(STAT_OBJ_PREFIX),
                     (k, oldV, newV) -> {
-                        // Skip invoke on start node (see 
'ReadableDistributedMetaStorage#listen' the second case)
+                        // Skip invocation at node start (see 
'ReadableDistributedMetaStorage#listen' the second case)
                         // The update statistics on start node is handled by 
'scanAndCheckLocalStatistic' method
                         // called on exchange done.
                         if (topVer == null)
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsHelper.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsHelper.java
index ce7cd5ae68e..a5647f796fd 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsHelper.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsHelper.java
@@ -220,13 +220,13 @@ public class IgniteStatisticsHelper {
 
     /**
      * Calculate effective row count. If there are some overrides in 
statistics configuration - maximum value will be
-     * choosen. If not - will return actualRowCount.
+     * choosen. If not - will return {@code actualRowCnt}.
      *
      * @param cfg Statistics configuration to dig overrides row count from.
-     * @param actualRowCount Actual row count.
+     * @param actualRowCnt Actual row count.
      * @return Effective row count.
      */
-    public static long calculateRowCount(StatisticsObjectConfiguration cfg, 
long actualRowCount) {
+    public static long calculateRowCount(StatisticsObjectConfiguration cfg, 
long actualRowCnt) {
         long overridedRowCnt = -1;
 
         for (StatisticsColumnConfiguration ccfg : cfg.columns().values()) {
@@ -237,7 +237,7 @@ public class IgniteStatisticsHelper {
             }
         }
 
-        return (overridedRowCnt == -1) ? actualRowCount : overridedRowCnt;
+        return (overridedRowCnt == -1) ? actualRowCnt : overridedRowCnt;
     }
 
     /**
@@ -247,7 +247,7 @@ public class IgniteStatisticsHelper {
      * @return StatisticsObjectConfiguration array.
      */
     public static StatisticsObjectConfiguration[] 
buildDefaultConfigurations(StatisticsTarget... targets) {
-        StatisticsObjectConfiguration[] res = Arrays.stream(targets)
+        return Arrays.stream(targets)
             .map(t -> {
                 List<StatisticsColumnConfiguration> colCfgs;
                 if (t.columns() == null)
@@ -259,8 +259,6 @@ public class IgniteStatisticsHelper {
                 return new StatisticsObjectConfiguration(t.key(), colCfgs,
                     
StatisticsObjectConfiguration.DEFAULT_OBSOLESCENCE_MAX_PERCENT);
             }).toArray(StatisticsObjectConfiguration[]::new);
-
-        return res;
     }
 
     /**
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java
index c39151b83f8..a9bd0df82e3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java
@@ -373,7 +373,7 @@ public class IgniteStatisticsManagerImpl implements 
IgniteStatisticsManager {
     }
 
     /** {@inheritDoc} */
-    @Override public void refreshStatistics(StatisticsTarget... targets) 
throws IgniteCheckedException {
+    @Override public void refreshStatistics(StatisticsTarget... targets) {
         ensureActive("refresh statistics");
 
         if (usageState() == OFF)
@@ -383,7 +383,7 @@ public class IgniteStatisticsManagerImpl implements 
IgniteStatisticsManager {
     }
 
     /** {@inheritDoc} */
-    @Override public void dropAll() throws IgniteCheckedException {
+    @Override public void dropAll() {
         ensureActive("drop all statistics");
 
         statCfgMgr.dropAll();
@@ -421,7 +421,7 @@ public class IgniteStatisticsManagerImpl implements 
IgniteStatisticsManager {
     }
 
     /** {@inheritDoc} */
-    @Override public void usageState(StatisticsUsageState state) throws 
IgniteCheckedException {
+    @Override public void usageState(StatisticsUsageState state) {
         ensureActive("change usage state of statistics");
 
         try {
@@ -486,8 +486,8 @@ public class IgniteStatisticsManagerImpl implements 
IgniteStatisticsManager {
             try {
                 cfg = statCfgMgr.config(key);
             }
-            catch (IgniteCheckedException e) {
-                // No-op/
+            catch (IgniteCheckedException ignored) {
+                // No-op.
             }
 
             Set<Integer> tasksParts = calculateObsolescencedPartitions(cfg, 
statsRepos.getObsolescence(key));
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsUsageState.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsUsageState.java
index 8391090e99c..a6e81f20ebd 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsUsageState.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsUsageState.java
@@ -31,7 +31,7 @@ public enum StatisticsUsageState {
     NO_UPDATE(1),
 
     /**
-     * Statistics used and updated after each changes.
+     * Statistics used and updated after each change.
      */
     ON(2);
 
@@ -42,7 +42,7 @@ public enum StatisticsUsageState {
     private static final StatisticsUsageState[] VALS;
 
     static {
-        StatisticsUsageState[] statisticsUsageStates = 
StatisticsUsageState.values();
+        StatisticsUsageState[] statisticsUsageStates = values();
 
         int maxIdx = 0;
         for (StatisticsUsageState recordType : statisticsUsageStates)
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java
index ef4e0a7e5f2..41af0d0318d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java
@@ -154,8 +154,7 @@ public class GatherPartitionStatistics implements 
Callable<ObjectPartitionStatis
     private ObjectPartitionStatisticsImpl processPartition(
         GridCacheContext<?, ?> cctx
     ) {
-        ObjectPartitionStatisticsImpl partStat = 
statRepo.getLocalPartitionStatistics(
-            gathCtx.configuration().key(), partId);
+        ObjectPartitionStatisticsImpl partStat = 
statRepo.getLocalPartitionStatistics(gathCtx.configuration().key(), partId);
 
         Map<String, StatisticsColumnConfiguration> colsToCollect = 
getColumnsToCollect(partStat);
         Set<String> colsToRemove = getColumnsToRemove(partStat);
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
index 799cadfeb02..52abb65819d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
@@ -211,8 +211,7 @@ public class GridTaskProcessor extends GridProcessorAdapter 
implements IgniteCha
         if (!active)
             return;
 
-        tasksMetaCache = ctx.security().enabled() ?
-            ctx.cache().<GridTaskNameHashKey, String>utilityCache() : null;
+        tasksMetaCache = ctx.security().enabled() ? ctx.cache().utilityCache() 
: null;
 
         startLatch.countDown();
     }
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/InitMessage.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/InitMessage.java
index 4be44dfb72e..3106b25acce 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/InitMessage.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/InitMessage.java
@@ -44,7 +44,7 @@ public class InitMessage<I extends Serializable> implements 
DiscoveryCustomMessa
     private final IgniteUuid id = IgniteUuid.randomUuid();
 
     /** Process id. */
-    private final UUID processId;
+    private final UUID procId;
 
     /** Process type. */
     private final int type;
@@ -56,12 +56,12 @@ public class InitMessage<I extends Serializable> implements 
DiscoveryCustomMessa
     private final boolean waitClnRes;
 
     /**
-     * @param processId Process id.
+     * @param procId Process id.
      * @param type Process type.
      * @param req Request.
      */
-    public InitMessage(UUID processId, DistributedProcessType type, I req, 
boolean waitClnRes) {
-        this.processId = processId;
+    public InitMessage(UUID procId, DistributedProcessType type, I req, 
boolean waitClnRes) {
+        this.procId = procId;
         this.type = type.ordinal();
         this.req = req;
         this.waitClnRes = waitClnRes;
@@ -90,7 +90,7 @@ public class InitMessage<I extends Serializable> implements 
DiscoveryCustomMessa
 
     /** @return Process id. */
     public UUID processId() {
-        return processId;
+        return procId;
     }
 
     /** @return Process type. */
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index 57aeb328bdd..37f05ac1b27 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -200,7 +200,7 @@ class ClientImpl extends TcpDiscoveryImpl {
     private final CountDownLatch leaveLatch = new CountDownLatch(1);
 
     /** */
-    private final ScheduledExecutorService executorService;
+    private final ScheduledExecutorService executorSrvc;
 
     /** */
     private MessageWorker msgWorker;
@@ -221,7 +221,7 @@ class ClientImpl extends TcpDiscoveryImpl {
         String instanceName = adapter.ignite() == null || 
adapter.ignite().name() == null
             ? "client-node" : adapter.ignite().name();
 
-        executorService = Executors.newSingleThreadScheduledExecutor(
+        executorSrvc = Executors.newSingleThreadScheduledExecutor(
             new IgniteThreadFactory(instanceName, "tcp-discovery-exec"));
     }
 
@@ -318,7 +318,7 @@ class ClientImpl extends TcpDiscoveryImpl {
             }
         }.start();
 
-        executorService.scheduleAtFixedRate(new MetricsSender(), 
spi.metricsUpdateFreq, spi.metricsUpdateFreq, MILLISECONDS);
+        executorSrvc.scheduleAtFixedRate(new MetricsSender(), 
spi.metricsUpdateFreq, spi.metricsUpdateFreq, MILLISECONDS);
 
         try {
             joinLatch.await();
@@ -369,7 +369,7 @@ class ClientImpl extends TcpDiscoveryImpl {
         while (!U.join(sockReader, log, 200))
             U.interrupt(sockReader);
 
-        executorService.shutdownNow();
+        executorSrvc.shutdownNow();
 
         spi.printStopInfo();
     }
@@ -435,7 +435,7 @@ class ClientImpl extends TcpDiscoveryImpl {
                 else {
                     final GridFutureAdapter<Boolean> finalFut = fut;
 
-                    executorService.schedule(() -> {
+                    executorSrvc.schedule(() -> {
                         if (pingFuts.remove(nodeId, finalFut)) {
                             if (ClientImpl.this.state == DISCONNECTED)
                                 finalFut.onDone(new 
IgniteClientDisconnectedCheckedException(null,
@@ -2144,7 +2144,7 @@ class ClientImpl extends TcpDiscoveryImpl {
             if (spi.joinTimeout > 0) {
                 final int joinCnt0 = joinCnt;
 
-                executorService.schedule(() -> {
+                executorSrvc.schedule(() -> {
                     queue.add(new JoinTimeout(joinCnt0));
                 }, spi.joinTimeout, MILLISECONDS);
             }
@@ -2746,7 +2746,7 @@ class ClientImpl extends TcpDiscoveryImpl {
      */
     private static class JoinTimeout {
         /** */
-        private int joinCnt;
+        private final int joinCnt;
 
         /**
          * @param joinCnt Join count to compare.
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index acbccbb09a6..fb62c61f96f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -545,9 +545,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                 }
 
                 if (spiState == LEFT) {
-                    if (log.isDebugEnabled())
+                    if (log.isDebugEnabled()) {
                         log.debug("Verification for local node leave has been 
received from coordinator" +
                             " (continuing stop procedure).");
+                    }
                 }
                 else if (log.isInfoEnabled()) {
                     log.info("No verification for local node leave has been 
received from coordinator" +
@@ -989,7 +990,7 @@ class ServerImpl extends TcpDiscoveryImpl {
      */
     private void interruptPing(TcpDiscoveryNode node) {
         for (InetSocketAddress addr : spi.getAllNodeAddresses(node)) {
-            GridPingFutureAdapter fut = pingMap.get(addr);
+            GridPingFutureAdapter<?> fut = pingMap.get(addr);
 
             if (fut != null && fut.sock != null) {
                 if (fut.nodeId == null || fut.nodeId.equals(node.id()))
@@ -1326,9 +1327,10 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                             break;
                         case RES_OK:
-                            if (log.isDebugEnabled())
+                            if (log.isDebugEnabled()) {
                                 log.debug("Join request message has been sent 
to address [addr=" + addr +
                                     ", req=" + joinMsg + ']');
+                            }
 
                             // Join request sending succeeded, wait for 
response from topology.
                             return true;
@@ -1526,9 +1528,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                     debugLog(msg, "Message has been sent directly to address 
[msg=" + msg + ", addr=" + addr +
                         ", rmtNodeId=" + res.creatorNodeId() + ']');
 
-                if (log.isDebugEnabled())
+                if (log.isDebugEnabled()) {
                     log.debug("Message has been sent directly to address 
[msg=" + msg + ", addr=" + addr +
                         ", rmtNodeId=" + res.creatorNodeId() + ']');
+                }
 
                 // Connection has been established, but
                 // join request may not be unmarshalled on remote host.
@@ -1701,9 +1704,10 @@ class ServerImpl extends TcpDiscoveryImpl {
         DebugLogger log = type == EVT_NODE_METRICS_UPDATED ? traceLog : 
debugLog;
 
         if (lsnr != null && node.visible() && (spiState == CONNECTED || 
spiState == DISCONNECTING)) {
-            if (log.isDebugEnabled())
+            if (log.isDebugEnabled()) {
                 log.debug("Discovery notification [node=" + node + ", 
spiState=" + spiState +
                     ", type=" + U.gridEventName(type) + ", topVer=" + topVer + 
']');
+            }
 
             Collection<ClusterNode> top = upcast(ring.visibleNodes());
 
@@ -1715,10 +1719,9 @@ class ServerImpl extends TcpDiscoveryImpl {
 
             return true;
         }
-        else {
-            if (log.isDebugEnabled())
-                log.debug("Skipped discovery notification [node=" + node + ", 
spiState=" + spiState +
-                    ", type=" + U.gridEventName(type) + ", topVer=" + topVer + 
']');
+        else if (log.isDebugEnabled()) {
+            log.debug("Skipped discovery notification [node=" + node + ", 
spiState=" + spiState +
+                ", type=" + U.gridEventName(type) + ", topVer=" + topVer + 
']');
         }
 
         return false;
@@ -1814,7 +1817,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 
             TcpDiscoveryNode coord = resolveCoordinator();
 
-            if (log.isInfoEnabled())
+            if (log.isInfoEnabled()) {
                 log.info("Discovery SPI statistics [statistics=" + spi.stats + 
", spiState=" + spiStateCopy() +
                     ", coord=" + coord +
                     ", next=" + (msgWorker != null ? msgWorker.next : "N/A") +
@@ -1830,6 +1833,7 @@ class ServerImpl extends TcpDiscoveryImpl {
                     ", lastUpdate=" + (locNode != null ? 
U.format(locNode.lastUpdateTime()) : "N/A") +
                     ", heapFree=" + runtime.freeMemory() / (1024 * 1024) +
                     "M, heapTotal=" + runtime.maxMemory() / (1024 * 1024) + 
"M]");
+            }
         }
     }
 
@@ -3159,9 +3163,10 @@ class ServerImpl extends TcpDiscoveryImpl {
 
             synchronized (mux) {
                 if (spiState == RING_FAILED) {
-                    if (log.isDebugEnabled())
+                    if (log.isDebugEnabled()) {
                         log.debug("Discovery detected ring connectivity issues 
and will stop local node, " +
                             "ignoring message [msg=" + msg + ", locNode=" + 
locNode + ']');
+                    }
 
                     if (msg instanceof TraceableMessage)
                         ((TraceableMessage)msg).spanContainer().span()
@@ -3425,9 +3430,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                 }
 
                 if (!newNext.equals(next)) {
-                    if (log.isDebugEnabled())
+                    if (log.isDebugEnabled()) {
                         log.debug("New next node [newNext=" + newNext + ", 
formerNext=" + next +
                             ", ring=" + ring + ", failedNodes=" + failedNodes 
+ ']');
+                    }
                     else if (log.isInfoEnabled())
                         log.info("New next node [newNext=" + newNext + ']');
 
@@ -3453,9 +3459,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                     long ackTimeout0 = spi.getAckTimeout();
 
                     if (locNodeAddrs.contains(addr)) {
-                        if (log.isDebugEnabled())
+                        if (log.isDebugEnabled()) {
                             log.debug("Skip to send message to the local node 
(probably remote node has the same " +
                                 "loopback address that local node): " + addr);
+                        }
 
                         continue;
                     }
@@ -3563,13 +3570,15 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                                 if (!next.id().equals(nextId)) {
                                     // Node with different ID has bounded to 
the same port.
-                                    if (log.isDebugEnabled())
+                                    if (log.isDebugEnabled()) {
                                         log.debug("Failed to restore ring 
because next node ID received is not as " +
                                             "expected [expectedId=" + 
next.id() + ", rcvdId=" + nextId + ']');
+                                    }
 
-                                    if (debugMode)
+                                    if (debugMode) {
                                         debugLog(msg, "Failed to restore ring 
because next node ID received is not " +
                                             "as expected [expectedId=" + 
next.id() + ", rcvdId=" + nextId + ']');
+                                    }
 
                                     break;
                                 }
@@ -3584,15 +3593,17 @@ class ServerImpl extends TcpDiscoveryImpl {
                                             nextNew = 
hasPendingAddMessage(nextId);
 
                                         if (!nextNew) {
-                                            if (log.isDebugEnabled())
+                                            if (log.isDebugEnabled()) {
                                                 log.debug("Failed to restore 
ring because next node order received " +
                                                     "is not as expected 
[expected=" + next.internalOrder() +
                                                     ", rcvd=" + nextOrder + ", 
id=" + next.id() + ']');
+                                            }
 
-                                            if (debugMode)
+                                            if (debugMode) {
                                                 debugLog(msg, "Failed to 
restore ring because next node order " +
                                                     "received is not as 
expected [expected=" + next.internalOrder() +
                                                     ", rcvd=" + nextOrder + ", 
id=" + next.id() + ']');
+                                            }
 
                                             break;
                                         }
@@ -3677,17 +3688,19 @@ class ServerImpl extends TcpDiscoveryImpl {
                             assert !forceSndPending || msg instanceof 
TcpDiscoveryNodeLeftMessage;
 
                             if (failure || forceSndPending || newNextNode) {
-                                if (log.isDebugEnabled())
+                                if (log.isDebugEnabled()) {
                                     log.debug("Pending messages will be sent 
[failure=" + failure +
                                         ", newNextNode=" + newNextNode +
                                         ", forceSndPending=" + forceSndPending 
+
                                         ", failedNodes=" + failedNodes + ']');
+                                }
 
-                                if (debugMode)
+                                if (debugMode) {
                                     debugLog(msg, "Pending messages will be 
sent [failure=" + failure +
                                         ", newNextNode=" + newNextNode +
                                         ", forceSndPending=" + forceSndPending 
+
                                         ", failedNodes=" + failedNodes + ']');
+                                }
 
                                 for (TcpDiscoveryAbstractMessage pendingMsg : 
pendingMsgs) {
                                     long tsNanos = System.nanoTime();
@@ -3716,15 +3729,17 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                                     spi.stats.onMessageSent(pendingMsg, 
U.nanosToMillis(tsNanos0 - tsNanos));
 
-                                    if (log.isDebugEnabled())
+                                    if (log.isDebugEnabled()) {
                                         log.debug("Pending message has been 
sent to next node [msgId=" + msg.id() +
                                             ", pendingMsgId=" + 
pendingMsg.id() + ", next=" + next.id() +
                                             ", res=" + res + ']');
+                                    }
 
-                                    if (debugMode)
+                                    if (debugMode) {
                                         debugLog(msg, "Pending message has 
been sent to next node [msgId=" + msg.id() +
                                             ", pendingMsgId=" + 
pendingMsg.id() + ", next=" + next.id() +
                                             ", res=" + res + ']');
+                                    }
 
                                     // Resetting timeout control object to 
create a new one for the next bunch of
                                     // operations.
@@ -3835,9 +3850,10 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                                 sock = null;
 
-                                if (log.isDebugEnabled())
+                                if (log.isDebugEnabled()) {
                                     log.debug("Message has not been sent 
[next=" + next.id() + ", msg=" + msg +
                                         (!spi.failureDetectionTimeoutEnabled() 
? ", i=" + reconCnt : "") + ']');
+                                }
                             }
                         }
                     } // Try to reconnect.
@@ -3957,9 +3973,10 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                 msgWorker.addMessage(pendingMsg);
 
-                if (log.isDebugEnabled())
+                if (log.isDebugEnabled()) {
                     log.debug("Pending message has been sent to local node 
[msg=" + curMsg.id() +
                         ", pendingMsg=" + pendingMsg + ']');
+                }
 
                 if (debugMode) {
                     debugLog(curMsg, "Pending message has been sent to local 
node [msg=" + curMsg.id() +
@@ -4135,9 +4152,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                             locNodeId, locNode.addresses(), 
locNode.hostNames()));
                     }
                     catch (IgniteSpiException e) {
-                        if (log.isDebugEnabled())
+                        if (log.isDebugEnabled()) {
                             log.debug("Failed to send loopback problem message 
to node " +
                                 "[node=" + node + ", err=" + e.getMessage() + 
']');
+                        }
 
                         onException("Failed to send loopback problem message 
to node " +
                             "[node=" + node + ", err=" + e.getMessage() + ']', 
e);
@@ -4178,10 +4196,11 @@ class ServerImpl extends TcpDiscoveryImpl {
                             trySendMessageDirectly(node, 
createTcpDiscoveryDuplicateIdMessage(locNodeId, existingNode));
                         }
                         catch (IgniteSpiException e) {
-                            if (log.isDebugEnabled())
+                            if (log.isDebugEnabled()) {
                                 log.debug("Failed to send duplicate ID message 
to node " +
                                     "[node=" + node + ", existingNode=" + 
existingNode +
                                     ", err=" + e.getMessage() + ']');
+                            }
 
                             onException("Failed to send duplicate ID message 
to node " +
                                 "[node=" + node + ", existingNode=" + 
existingNode + ']', e);
@@ -4215,18 +4234,20 @@ class ServerImpl extends TcpDiscoveryImpl {
                             reconMsg.success(true);
                         }
 
-                        if (log.isDebugEnabled())
+                        if (log.isDebugEnabled()) {
                             log.debug("Send reconnect message to already 
joined client " +
                                 "[clientNode=" + existingNode + ", msg=" + 
reconMsg + ']');
+                        }
 
                         if 
(getLocalNodeId().equals(node.clientRouterNodeId())) {
                             ClientMessageWorker wrk = 
clientMsgWorkers.get(node.id());
 
                             if (wrk != null)
                                 wrk.addMessage(reconMsg);
-                            else if (log.isDebugEnabled())
+                            else if (log.isDebugEnabled()) {
                                 log.debug("Failed to find client message 
worker " +
                                     "[clientNode=" + existingNode + ", msg=" + 
reconMsg + ']');
+                            }
                         }
                         else {
                             if (sendMessageToRemotes(reconMsg))
@@ -4250,10 +4271,11 @@ class ServerImpl extends TcpDiscoveryImpl {
                                 trySendMessageDirectly(node, 
createTcpDiscoveryDuplicateIdMessage(locNodeId, node));
                             }
                             catch (IgniteSpiException e) {
-                                if (log.isDebugEnabled())
+                                if (log.isDebugEnabled()) {
                                     log.debug("Failed to send duplicate ID 
message to node " +
                                         "[node=" + node +
                                         ", err=" + e.getMessage() + ']');
+                                }
 
                                 onException("Failed to send duplicate ID 
message to node: " + node, e);
                             }
@@ -4281,9 +4303,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                                 ", addrs=" + U.addressesAsString(node) + ']');
 
                             // Always output in debug.
-                            if (log.isDebugEnabled())
+                            if (log.isDebugEnabled()) {
                                 log.debug("Authentication failed [nodeId=" + 
node.id() + ", addrs=" +
                                     U.addressesAsString(node));
+                            }
 
                             try {
                                 trySendMessageDirectly(
@@ -4292,9 +4315,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                                 );
                             }
                             catch (IgniteSpiException e) {
-                                if (log.isDebugEnabled())
+                                if (log.isDebugEnabled()) {
                                     log.debug("Failed to send unauthenticated 
message to node " +
                                         "[node=" + node + ", err=" + 
e.getMessage() + ']');
+                                }
 
                                 onException("Failed to send unauthenticated 
message to node " +
                                     "[node=" + node + ", err=" + 
e.getMessage() + ']', e);
@@ -4315,9 +4339,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                                     ", addrs=" + U.addressesAsString(node) + 
']');
 
                                 // Always output in debug.
-                                if (log.isDebugEnabled())
+                                if (log.isDebugEnabled()) {
                                     log.debug("Authentication subject is not 
serializable [nodeId=" + node.id() +
                                         ", addrs=" + 
U.addressesAsString(node));
+                                }
 
                                 try {
                                     trySendMessageDirectly(
@@ -4326,9 +4351,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                                     );
                                 }
                                 catch (IgniteSpiException e) {
-                                    if (log.isDebugEnabled())
+                                    if (log.isDebugEnabled()) {
                                         log.debug("Failed to send 
unauthenticated message to node " +
                                             "[node=" + node + ", err=" + 
e.getMessage() + ']');
+                                    }
                                 }
 
                                 // Ignore join request.
@@ -4348,9 +4374,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                         LT.error(log, e, "Authentication failed [nodeId=" + 
node.id() + ", addrs=" +
                             U.addressesAsString(node) + ']');
 
-                        if (log.isDebugEnabled())
+                        if (log.isDebugEnabled()) {
                             log.debug("Failed to authenticate node (will 
ignore join request) [node=" + node +
                                 ", err=" + e + ']');
+                        }
 
                         onException("Failed to authenticate node (will ignore 
join request) [node=" + node +
                             ", err=" + e + ']', e);
@@ -4399,10 +4426,11 @@ class ServerImpl extends TcpDiscoveryImpl {
                                 boolean ping = node.id().equals(err0.nodeId()) 
? pingNode(node) : pingNode(err0.nodeId());
 
                                 if (!ping) {
-                                    if (log.isDebugEnabled())
+                                    if (log.isDebugEnabled()) {
                                         log.debug("Conflicting node has 
already left, need to wait for event. " +
                                             "Will ignore join request for now 
since it will be recent [req=" + msg +
                                             ", err=" + err0.message() + ']');
+                                    }
 
                                     // Ignore join request.
                                     return;
@@ -4419,9 +4447,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                                         new 
TcpDiscoveryCheckFailedMessage(err0.nodeId(), err0.sendMessage()));
                                 }
                                 catch (IgniteSpiException e) {
-                                    if (log.isDebugEnabled())
+                                    if (log.isDebugEnabled()) {
                                         log.debug("Failed to send hash ID 
resolver validation failed message to node " +
                                             "[node=" + node + ", err=" + 
e.getMessage() + ']');
+                                    }
 
                                     onException("Failed to send hash ID 
resolver validation failed message to node " +
                                         "[node=" + node + ", err=" + 
e.getMessage() + ']', e);
@@ -5320,9 +5349,10 @@ class ServerImpl extends TcpDiscoveryImpl {
             assert msg != null;
 
             if (msg.maxHopsReached()) {
-                if (log.isInfoEnabled())
+                if (log.isInfoEnabled()) {
                     log.info("Latency check has been discarded (max hops 
reached) [id=" + msg.id() +
                         ", maxHops=" + msg.maxHops() + ']');
+                }
 
                 return;
             }
@@ -6532,11 +6562,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                         blockingSectionEnd();
                     }
 
-                    long tsNanos = System.nanoTime();
-
-                    if (log.isInfoEnabled())
+                    if (log.isInfoEnabled()) {
                         log.info("TCP discovery accepted incoming connection " 
+
                             "[rmtAddr=" + sock.getInetAddress() + ", rmtPort=" 
+ sock.getPort() + ']');
+                    }
 
                     SocketReader reader = new SocketReader(sock);
 
@@ -6544,9 +6573,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                         readers.add(reader);
                     }
 
-                    if (log.isInfoEnabled())
+                    if (log.isInfoEnabled()) {
                         log.info("TCP discovery spawning a new thread for 
connection " +
                             "[rmtAddr=" + sock.getInetAddress() + ", rmtPort=" 
+ sock.getPort() + ']');
+                    }
 
                     reader.start();
 
@@ -6631,9 +6661,10 @@ class ServerImpl extends TcpDiscoveryImpl {
 
             SocketAddress rmtAddr = sock.getRemoteSocketAddress();
 
-            if (log.isInfoEnabled())
+            if (log.isInfoEnabled()) {
                 log.info("Started serving remote node connection [rmtAddr=" + 
rmtAddr +
                     ", rmtPort=" + sock.getPort() + ']');
+            }
 
             boolean srvSock;
 
@@ -6701,10 +6732,11 @@ class ServerImpl extends TcpDiscoveryImpl {
                         if (!spi.isNodeStopping0()) {
                             TcpDiscoveryPingRequest req = 
(TcpDiscoveryPingRequest)msg;
 
-                            if (log.isInfoEnabled())
+                            if (log.isInfoEnabled()) {
                                 log.info("Received ping request from the 
remote node " +
                                     "[rmtNodeId=" + msg.creatorNodeId() +
                                     ", rmtAddr=" + rmtAddr + ", rmtPort=" + 
sock.getPort() + "]");
+                            }
 
                             TcpDiscoveryPingResponse res = new 
TcpDiscoveryPingResponse(locNodeId);
 
@@ -6723,9 +6755,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                             if (!(sock instanceof SSLSocket))
                                 sock.shutdownOutput();
 
-                            if (log.isInfoEnabled())
+                            if (log.isInfoEnabled()) {
                                 log.info("Finished writing ping response " + 
"[rmtNodeId=" + msg.creatorNodeId() +
                                     ", rmtAddr=" + rmtAddr + ", rmtPort=" + 
sock.getPort() + "]");
+                            }
                         }
                         else if (log.isDebugEnabled())
                             log.debug("Ignore ping request, node is 
stopping.");
@@ -7238,9 +7271,10 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                 U.close(sock, log);
 
-                if (log.isInfoEnabled())
+                if (log.isInfoEnabled()) {
                     log.info("Finished serving remote node connection 
[rmtAddr=" + rmtAddr +
                         ", rmtPort=" + sock.getPort() + ", rmtNodeId=" + 
nodeId + ']');
+                }
 
                 if (isLocalNodeCoordinator() && !ring.hasRemoteServerNodes())
                     U.enhanceThreadName(msgWorkerThread, "crd");
@@ -7367,22 +7401,25 @@ class ServerImpl extends TcpDiscoveryImpl {
                             msg.pendingMessages(pending);
                             msg.success(true);
 
-                            if (log.isDebugEnabled())
+                            if (log.isDebugEnabled()) {
                                 log.debug("Accept client reconnect, restored 
pending messages " +
                                     "[locNodeId=" + locNodeId + ", 
clientNodeId=" + nodeId + ']');
+                            }
                         }
                         else if (!isLocalNodeCoordinator()) {
-                            if (log.isDebugEnabled())
+                            if (log.isDebugEnabled()) {
                                 log.debug("Failed to restore pending messages 
for reconnecting client. " +
                                     "Forwarding reconnection message to 
coordinator " +
                                     "[locNodeId=" + locNodeId + ", 
clientNodeId=" + nodeId + ']');
+                            }
                         }
                         else {
                             msg.verify(locNodeId);
 
-                            if (log.isDebugEnabled())
+                            if (log.isDebugEnabled()) {
                                 log.debug("Failing reconnecting client node 
because failed to restore pending " +
                                     "messages [locNodeId=" + locNodeId + ", 
clientNodeId=" + nodeId + ']');
+                            }
 
                             TcpDiscoveryNodeFailedMessage nodeFailedMsg = new 
TcpDiscoveryNodeFailedMessage(locNodeId,
                                 node.id(), node.internalOrder());
@@ -7402,9 +7439,10 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                         if (wrk != null)
                             wrk.addMessage(msg);
-                        else if (log.isDebugEnabled())
+                        else if (log.isDebugEnabled()) {
                             log.debug("Failed to reconnect client node 
(disconnected during the process) [locNodeId=" +
                                 locNodeId + ", clientNodeId=" + nodeId + ']');
+                        }
                     }
                     else
                         msgWorker.addMessage(msg);
@@ -7421,9 +7459,10 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                     if (wrk != null)
                         wrk.addMessage(msg);
-                    else if (log.isDebugEnabled())
+                    else if (log.isDebugEnabled()) {
                         log.debug("Failed to reconnect client node 
(disconnected during the process) [locNodeId=" +
                             locNodeId + ", clientNodeId=" + nodeId + ']');
+                    }
                 }
                 else if (ring.hasRemoteNodes() && !isLocalNodeCoordinator())
                     msgWorker.addMessage(msg);
@@ -7541,9 +7580,10 @@ class ServerImpl extends TcpDiscoveryImpl {
                     }
                 }
                 catch (IgniteCheckedException e) {
-                    if (log.isDebugEnabled())
+                    if (log.isDebugEnabled()) {
                         log.debug("Failed to ping joining node, closing 
connection. [node=" + node +
                             ", err=" + e.getMessage() + ']');
+                    }
                 }
             }
 
@@ -7713,25 +7753,28 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                         if (node != null)
                             clientVer = IgniteUtils.productVersion(node);
-                        else if (msgLog.isDebugEnabled())
+                        else if (msgLog.isDebugEnabled()) {
                             msgLog.debug("Skip sending message ack to client, 
fail to get client node " +
                                 "[sock=" + sock + ", locNodeId=" + 
getLocalNodeId() +
                                 ", rmtNodeId=" + clientNodeId + ", msg=" + msg 
+ ']');
+                        }
                     }
 
                     if (clientVer != null) {
-                        if (msgLog.isDebugEnabled())
+                        if (msgLog.isDebugEnabled()) {
                             msgLog.debug("Sending message ack to client 
[sock=" + sock + ", locNodeId="
                                 + getLocalNodeId() + ", rmtNodeId=" + 
clientNodeId + ", msg=" + msg + ']');
+                        }
 
                         spi.writeToSocket(sock, msg, msgBytes, 
spi.failureDetectionTimeoutEnabled() ?
                             spi.clientFailureDetectionTimeout() : 
spi.getSocketTimeout());
                     }
                 }
                 else {
-                    if (msgLog.isDebugEnabled())
+                    if (msgLog.isDebugEnabled()) {
                         msgLog.debug("Redirecting message to client [sock=" + 
sock + ", locNodeId="
                             + getLocalNodeId() + ", rmtNodeId=" + clientNodeId 
+ ", msg=" + msg + ']');
+                    }
 
                     assert topologyInitialized(msg) : msg;
 
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/OnePhaseCommitAndNodeLeftTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/OnePhaseCommitAndNodeLeftTest.java
index 6d7ec5b6b0c..5b45d385428 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/OnePhaseCommitAndNodeLeftTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/OnePhaseCommitAndNodeLeftTest.java
@@ -185,7 +185,7 @@ public class OnePhaseCommitAndNodeLeftTest extends 
GridCommonAbstractTest {
             return false;
         });
 
-        String testVal = "Tets value";
+        String testVal = "Test value";
 
         IgniteInternalFuture putFut = GridTestUtils.runAsync(() -> {
             try {
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/RebalanceIsProcessingWhenAssignmentIsEmptyTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/RebalanceIsProcessingWhenAssignmentIsEmptyTest.java
index c6d0f25fa44..e3802dbae20 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/RebalanceIsProcessingWhenAssignmentIsEmptyTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/RebalanceIsProcessingWhenAssignmentIsEmptyTest.java
@@ -89,7 +89,7 @@ public class RebalanceIsProcessingWhenAssignmentIsEmptyTest 
extends GridCommonAb
     }
 
     /**
-     * Tets affinity function.
+     * Tests affinity function.
      * It gives same assignment on second node in topology of three nodes and 
differences in fours.
      */
     public static class TestAffinity extends RendezvousAffinityFunction {
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/SupplyPartitionHistoricallyWithReorderedUpdates.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/SupplyPartitionHistoricallyWithReorderedUpdates.java
index 9beb9f9489e..d6dd481f008 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/SupplyPartitionHistoricallyWithReorderedUpdates.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/SupplyPartitionHistoricallyWithReorderedUpdates.java
@@ -179,7 +179,7 @@ public class 
SupplyPartitionHistoricallyWithReorderedUpdates extends GridCommonA
     }
 
     /**
-     * Tets affinity function with one partition. This implementation maps 
primary partition to first node and backup
+     * Tests affinity function with one partition. This implementation maps 
primary partition to first node and backup
      * partition to second.
      */
     public static class TestAffinity extends RendezvousAffinityFunction {
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceLoggingTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceLoggingTest.java
index 8c2b8e4d164..2dc8fb425f5 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceLoggingTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceLoggingTest.java
@@ -267,7 +267,7 @@ public class IgniteWalRebalanceLoggingTest extends 
GridCommonAbstractTest {
         }
     }
 
-    /** Tets WAL record. */
+    /** Tests WAL record. */
     private static class AdHocWALRecord extends CheckpointRecord {
         /** Default constructor. */
         private AdHocWALRecord() {
diff --git 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java
index 0bc988cdce8..14baed33753 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java
@@ -302,7 +302,7 @@ public class TcpClientDiscoverySpiFailureTimeoutSelfTest 
extends TcpClientDiscov
 
             Thread.sleep(failureDetectionTimeout());
 
-            assertTrue(firstSpi.err != null && X.hasCause(firstSpi.err, 
SocketTimeoutException.class));
+            assertTrue(X.hasCause(firstSpi.err, SocketTimeoutException.class));
 
             firstSpi.reset();
             secondSpi.reset();
diff --git 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java
index a9bf8cb38c4..fe47463bd96 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java
@@ -116,7 +116,7 @@ public class TcpDiscoveryClientSuspensionSelfTest extends 
GridCommonAbstractTest
 
         ClientImpl impl = U.field(client.configuration().getDiscoverySpi(), 
"impl");
 
-        ScheduledExecutorService executorSrvc = U.field(impl, 
"executorService");
+        ScheduledExecutorService executorSrvc = U.field(impl, "executorSrvc");
 
         executorSrvc.shutdownNow();
 
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/TableStatisticsAbstractTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/TableStatisticsAbstractTest.java
index ff7b7d6cf01..3c79a44268a 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/TableStatisticsAbstractTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/TableStatisticsAbstractTest.java
@@ -125,7 +125,7 @@ public abstract class TableStatisticsAbstractTest extends 
GridCommonAbstractTest
         int scanCnt = 0;
 
         while (m.find())
-            scanCnt += Integer.valueOf(m.group(1));
+            scanCnt += Integer.parseInt(m.group(1));
 
         return scanCnt;
     }
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsObsolescenceTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsObsolescenceTest.java
index 417f8374317..f7ca1b2670a 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsObsolescenceTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsObsolescenceTest.java
@@ -224,7 +224,7 @@ public class StatisticsObsolescenceTest extends 
StatisticsAbstractTest {
         Map<StatisticsKey, IntMap<ObjectPartitionStatisticsObsolescence>> 
statObs = GridTestUtils
             .getFieldValue(statisticsMgr(0).statisticsRepository(), "statObs");
 
-        Integer oldSize = statObs.get(SMALL_KEY).size();
+        int oldSize = statObs.get(SMALL_KEY).size();
 
         ignite.cluster().state(ClusterState.ACTIVE);
 

Reply via email to