You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ni...@apache.org on 2023/12/20 08:32:09 UTC

(ignite) branch master updated: IGNITE-14823 Exception abbrevation (#11113)

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

nizhikov 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 fe11df1327b IGNITE-14823 Exception abbrevation (#11113)
fe11df1327b is described below

commit fe11df1327b9cd2a7746bdcb8f0a3b87b348cbae
Author: Nikolay <ni...@apache.org>
AuthorDate: Wed Dec 20 11:31:59 2023 +0300

    IGNITE-14823 Exception abbrevation (#11113)
---
 .../query/calcite/exec/exp/RexToLixTranslator.java |  4 +--
 .../checkstyle/src/main/resources/abbrevations.csv |  2 +-
 .../jdbc/thin/JdbcThinConnectionSelfTest.java      |  6 ++---
 .../deployment/GridDeploymentClassLoader.java      |  8 +++---
 .../managers/discovery/GridDiscoveryManager.java   |  6 ++---
 .../cache/IgniteCacheOffheapManagerImpl.java       | 10 ++++----
 .../processors/cache/IgniteCacheProxyImpl.java     |  6 ++---
 .../preloader/GridDhtPartitionsExchangeFuture.java |  6 ++---
 .../processors/platform/cache/PlatformCache.java   | 12 ++++-----
 .../processors/platform/utils/PlatformUtils.java   |  4 +--
 .../communication/tcp/ClientExceptionsUtils.java   |  6 ++---
 .../GridCacheConcurrentGetCacheOnClientTest.java   | 10 ++++----
 ...acheAbstractDataStructuresFailoverSelfTest.java |  6 ++---
 .../datastructures/IgniteLockAbstractSelfTest.java |  6 ++---
 ...niteBaselineAffinityTopologyActivationTest.java | 30 +++++++++++-----------
 .../IgnitePdsCheckpointMapSnapshotTest.java        |  4 +--
 ...ailIsReachedDuringIterationOverArchiveTest.java |  6 ++---
 .../IgniteAbstractWalIteratorInvalidCrcTest.java   |  4 +--
 .../ignite/internal/util/IgniteUtilsSelfTest.java  |  6 ++---
 .../util/future/GridFutureAdapterSelfTest.java     |  6 ++---
 .../p2p/P2PClassLoadingFailureHandlingTest.java    |  6 ++---
 .../tcp/TcpDiscoveryNodeJoinAndFailureTest.java    |  6 ++---
 .../processors/query/h2/IgniteH2Indexing.java      | 10 ++++----
 23 files changed, 85 insertions(+), 85 deletions(-)

diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/RexToLixTranslator.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/RexToLixTranslator.java
index 3be0a7cf6b6..ff90354b6d6 100644
--- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/RexToLixTranslator.java
+++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/RexToLixTranslator.java
@@ -1367,8 +1367,8 @@ public class RexToLixTranslator implements RexVisitor<RexToLixTranslator.Result>
         Statement st = Expressions.statement(Expressions.assign(methodCall, callExpr));
         // Catch Block, wrap checked exception in unchecked exception
         ParameterExpression e = Expressions.parameter(0, Exception.class, "e");
-        Expression uncheckedException = Expressions.new_(RuntimeException.class, e);
-        CatchBlock cb = Expressions.catch_(e, Expressions.throw_(uncheckedException));
+        Expression uncheckedEx = Expressions.new_(RuntimeException.class, e);
+        CatchBlock cb = Expressions.catch_(e, Expressions.throw_(uncheckedEx));
         list.add(Expressions.tryCatch(st, cb));
         return methodCall;
     }
diff --git a/modules/checkstyle/src/main/resources/abbrevations.csv b/modules/checkstyle/src/main/resources/abbrevations.csv
index 674da91fd6c..e4c2bf90102 100644
--- a/modules/checkstyle/src/main/resources/abbrevations.csv
+++ b/modules/checkstyle/src/main/resources/abbrevations.csv
@@ -22,7 +22,7 @@ destination,dest
 directory,dir
 event,evt
 events,evts
-#exception,e,e2,ex
+exception,e,e2,ex
 #execute,exec
 #frequency,freq
 #future,fut
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java
index 17c871b0970..6f97da4c8c9 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java
@@ -2221,14 +2221,14 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
 
             f.get();
 
-            boolean exceptionFound = false;
+            boolean exFound = false;
 
             for (SQLException e : exs) {
                 if (e != null && e.getMessage().contains("Concurrent access to JDBC connection is not allowed"))
-                    exceptionFound = true;
+                    exFound = true;
             }
 
-            assertTrue("Concurrent access to JDBC connection is not allowed", exceptionFound);
+            assertTrue("Concurrent access to JDBC connection is not allowed", exFound);
         }
     }
 
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentClassLoader.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentClassLoader.java
index 6f59a0f098a..badce072c67 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentClassLoader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentClassLoader.java
@@ -694,14 +694,14 @@ class GridDeploymentClassLoader extends ClassLoader implements GridDeploymentInf
         }
 
         if (!clsRequestExceptions.isEmpty()) {
-            IgniteException exception = clsRequestExceptions.remove(0);
+            IgniteException ex = clsRequestExceptions.remove(0);
 
             for (Exception e : clsRequestExceptions)
-                exception.addSuppressed(e);
+                ex.addSuppressed(e);
 
-            LT.warn(log, exception.getMessage(), exception);
+            LT.warn(log, ex.getMessage(), ex);
 
-            throw exception;
+            throw ex;
         }
         else {
             ClassNotFoundException cnfe = new P2PClassNotFoundException("Failed to peer load class [" +
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index b5dd27c0ee8..9b9dfe8735e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -2875,14 +2875,14 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                     body0();
                 }
                 catch (Throwable t) {
-                    boolean isInterruptedException = X.hasCause(t, InterruptedException.class)
+                    boolean isInterruptedEx = X.hasCause(t, InterruptedException.class)
                         || X.hasCause(t, IgniteInterruptedException.class)
                         || X.hasCause(t, IgniteInterruptedCheckedException.class);
 
-                    if (!isInterruptedException)
+                    if (!isInterruptedEx)
                         U.error(log, "Exception in discovery notifier worker thread.", t);
 
-                    if (!isInterruptedException || !isCancelled.get()) {
+                    if (!isInterruptedEx || !isCancelled.get()) {
                         FailureType type = t instanceof OutOfMemoryError ? CRITICAL_ERROR : SYSTEM_WORKER_TERMINATION;
 
                         ctx.failure().process(new FailureContext(type, t));
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index 1100e06ab09..fd52e8ca93c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -2838,7 +2838,7 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
 
         /** {@inheritDoc} */
         @Override public void destroy() throws IgniteCheckedException {
-            AtomicReference<IgniteCheckedException> exception = new AtomicReference<>();
+            AtomicReference<IgniteCheckedException> exRef = new AtomicReference<>();
 
             dataTree.destroy(row -> {
                 try {
@@ -2847,17 +2847,17 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                 catch (IgniteCheckedException e) {
                     U.error(log, "Failed to remove row [link=" + row.link() + "]");
 
-                    IgniteCheckedException ex = exception.get();
+                    IgniteCheckedException ex = exRef.get();
 
                     if (ex == null)
-                        exception.set(e);
+                        exRef.set(e);
                     else
                         ex.addSuppressed(e);
                 }
             }, false);
 
-            if (exception.get() != null)
-                throw new IgniteCheckedException("Failed to destroy store", exception.get());
+            if (exRef.get() != null)
+                throw new IgniteCheckedException("Failed to destroy store", exRef.get());
         }
 
         /** {@inheritDoc} */
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
index d638ec1856e..fe28eb70705 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
@@ -2051,9 +2051,9 @@ public class IgniteCacheProxyImpl<K, V> extends AsyncSupportAdapter<IgniteCache<
         GridFutureAdapter<Void> restartFut = this.restartFut.get();
 
         if (X.hasCause(e, IgniteCacheRestartingException.class)) {
-            IgniteCacheRestartingException restartingException = X.cause(e, IgniteCacheRestartingException.class);
+            IgniteCacheRestartingException restartingEx = X.cause(e, IgniteCacheRestartingException.class);
 
-            if (restartingException.restartFuture() == null) {
+            if (restartingEx.restartFuture() == null) {
                 if (restartFut == null)
                     restartFut = suspend();
 
@@ -2062,7 +2062,7 @@ public class IgniteCacheProxyImpl<K, V> extends AsyncSupportAdapter<IgniteCache<
                 throw new IgniteCacheRestartingException(new IgniteFutureImpl<>(restartFut, exec()), cacheName);
             }
             else
-                throw restartingException;
+                throw restartingEx;
         }
 
         if (restartFut != null) {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index b6f2c727d44..ab7d43f40f2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -2970,11 +2970,11 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
      * @param msg Single message received from the client which didn't find original ExchangeFuture.
      */
     public void forceClientReconnect(ClusterNode node, GridDhtPartitionsSingleMessage msg) {
-        Exception reconnectException = new IgniteNeedReconnectException(node, null);
+        Exception reconnectEx = new IgniteNeedReconnectException(node, null);
 
-        exchangeGlobalExceptions.put(node.id(), reconnectException);
+        exchangeGlobalExceptions.put(node.id(), reconnectEx);
 
-        onDone(null, reconnectException);
+        onDone(null, reconnectEx);
 
         GridDhtPartitionsFullMessage fullMsg = createPartitionsMessage(true, false);
 
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index 97dec423aed..e4f179b3335 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -1288,15 +1288,15 @@ public class PlatformCache extends PlatformAbstractTarget {
         if (e.getCause() instanceof EntryProcessorException)
             return (Exception)e.getCause();
 
-        TransactionDeadlockException deadlockException = X.cause(e, TransactionDeadlockException.class);
+        TransactionDeadlockException deadlockEx = X.cause(e, TransactionDeadlockException.class);
 
-        if (deadlockException != null)
-            return deadlockException;
+        if (deadlockEx != null)
+            return deadlockEx;
 
-        TransactionTimeoutException timeoutException = X.cause(e, TransactionTimeoutException.class);
+        TransactionTimeoutException timeoutEx = X.cause(e, TransactionTimeoutException.class);
 
-        if (timeoutException != null)
-            return timeoutException;
+        if (timeoutEx != null)
+            return timeoutEx;
 
         return super.convertException(e);
     }
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
index 0690e145aab..575f2eb9dcd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
@@ -861,9 +861,9 @@ public class PlatformUtils {
             return deserialize ? reader.readObject() : reader.readObjectDetached();
         else {
             // 3. Read whether exception is in form of object or string.
-            boolean hasException = reader.readBoolean();
+            boolean hasEx = reader.readBoolean();
 
-            if (hasException) {
+            if (hasEx) {
                 // 4. Full exception.
                 Object nativeErr = reader.readObjectDetached();
 
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/ClientExceptionsUtils.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/ClientExceptionsUtils.java
index f00b80624ec..072d2a31961 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/ClientExceptionsUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/ClientExceptionsUtils.java
@@ -48,10 +48,10 @@ public class ClientExceptionsUtils {
      *     was made while only inverse connections are allowed.
      */
     public static boolean isAttemptToEstablishDirectConnectionWhenOnlyInverseIsAllowed(Throwable t) {
-        IgniteSpiException igniteSpiException = X.cause(t, IgniteSpiException.class);
+        IgniteSpiException igniteSpiEx = X.cause(t, IgniteSpiException.class);
 
-        return igniteSpiException != null && igniteSpiException.getMessage() != null
-            && igniteSpiException.getMessage().contains(
+        return igniteSpiEx != null && igniteSpiEx.getMessage() != null
+            && igniteSpiEx.getMessage().contains(
                 "because it is started in 'forceClientToServerConnections' mode; inverse connection will be requested");
     }
 }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java
index e2f7a5d5002..77af8c434e0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java
@@ -52,7 +52,7 @@ public class GridCacheConcurrentGetCacheOnClientTest extends GridCommonAbstractT
 
         final AtomicInteger cntFails = new AtomicInteger();
 
-        final AtomicInteger exceptionFails = new AtomicInteger();
+        final AtomicInteger exFails = new AtomicInteger();
 
         final String cacheName = "TEST_CACHE";
 
@@ -69,7 +69,7 @@ public class GridCacheConcurrentGetCacheOnClientTest extends GridCommonAbstractT
                     stopLatch.countDown();
                 }
                 catch (Exception e) {
-                    exceptionFails.incrementAndGet();
+                    exFails.incrementAndGet();
                 }
             }
         });
@@ -87,7 +87,7 @@ public class GridCacheConcurrentGetCacheOnClientTest extends GridCommonAbstractT
                     stopLatch.countDown();
                 }
                 catch (Exception e) {
-                    exceptionFails.incrementAndGet();
+                    exFails.incrementAndGet();
                 }
             }
         });
@@ -103,7 +103,7 @@ public class GridCacheConcurrentGetCacheOnClientTest extends GridCommonAbstractT
 
         stopLatch.await();
 
-        if (cntFails.get() != 0 || exceptionFails.get() != 0)
-            fail("Cache return null in " + cntFails.get() + " of 3 cases. Total exception: " + exceptionFails.get());
+        if (cntFails.get() != 0 || exFails.get() != 0)
+            fail("Cache return null in " + cntFails.get() + " of 3 cases. Total exception: " + exFails.get());
     }
 }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
index 2ba6fdd4b9c..e7ed18c7056 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
@@ -766,7 +766,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
                 // Signal the server to go down.
                 ignite.semaphore("sync", 0, true, true).release();
 
-                boolean isExceptionThrown = false;
+                boolean isExThrown = false;
 
                 try {
                     // Wait for the server to go down.
@@ -780,10 +780,10 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
                     fail("Interrupted exception not expected here.");
                 }
                 catch (IgniteException ignored) {
-                    isExceptionThrown = true;
+                    isExThrown = true;
                 }
                 finally {
-                    assertTrue(isExceptionThrown);
+                    assertTrue(isExThrown);
 
                     assertFalse(l.isHeldByCurrentThread());
                 }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
index 842d2a1368c..5944e741339 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
@@ -934,7 +934,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
 
                             final AtomicBoolean done = new AtomicBoolean(false);
 
-                            final AtomicBoolean exceptionThrown = new AtomicBoolean(false);
+                            final AtomicBoolean exThrown = new AtomicBoolean(false);
 
                             final IgniteCountDownLatch latch = ignite.countDownLatch("latch", threadCnt, false, true);
 
@@ -946,7 +946,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
                                         l.lockInterruptibly();
                                     }
                                     catch (IgniteInterruptedException ignored) {
-                                        exceptionThrown.set(true);
+                                        exThrown.set(true);
                                     }
                                     finally {
                                         done.set(true);
@@ -980,7 +980,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
                                 throw new RuntimeException(e);
                             }
 
-                            assertTrue(exceptionThrown.get());
+                            assertTrue(exThrown.get());
 
                             return null;
                         }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java
index 9b740f6b926..d400a271cb2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java
@@ -184,7 +184,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
 
         ignite.cluster().setBaselineTopology(baselineNodes(ignite.cluster().forServers().nodes()));
 
-        boolean expectedExceptionThrown = false;
+        boolean expectedExThrown = false;
 
         try {
             ignite.cluster().setBaselineTopology(singleNodeTopVer);
@@ -194,10 +194,10 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
             assertTrue(errMsg.startsWith("Removing online nodes"));
             assertTrue(errMsg.contains("[OnlineConsID]"));
 
-            expectedExceptionThrown = true;
+            expectedExThrown = true;
         }
 
-        assertTrue(expectedExceptionThrown);
+        assertTrue(expectedExThrown);
     }
 
     /**
@@ -212,7 +212,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
         nodeC.cluster().baselineAutoAdjustEnabled(false);
         nodeC.cluster().state(ClusterState.ACTIVE);
 
-        boolean expectedExceptionIsThrown = false;
+        boolean expectedExIsThrown = false;
 
         try {
             nodeC.cluster().setBaselineTopology(Arrays.asList((BaselineNode)nodeA.cluster().localNode(),
@@ -223,10 +223,10 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
             assertTrue(errMsg.startsWith("Removing online nodes"));
             assertTrue(errMsg.contains("[OnlineConsID]"));
 
-            expectedExceptionIsThrown = true;
+            expectedExIsThrown = true;
         }
 
-        assertTrue(expectedExceptionIsThrown);
+        assertTrue(expectedExIsThrown);
     }
 
     /**
@@ -257,13 +257,13 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
         startGridWithConsistentId("A");
         startGridWithConsistentId("B");
 
-        boolean expectedExceptionThrown = false;
+        boolean expectedExThrown = false;
 
         try {
             startGridWithConsistentId("C");
         }
         catch (IgniteCheckedException e) {
-            expectedExceptionThrown = true;
+            expectedExThrown = true;
 
             if (e.getCause() != null && e.getCause().getCause() != null) {
                 Throwable rootCause = e.getCause().getCause();
@@ -275,7 +275,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
                 throw e;
         }
 
-        assertTrue("Expected exception wasn't thrown.", expectedExceptionThrown);
+        assertTrue("Expected exception wasn't thrown.", expectedExThrown);
     }
 
     /**
@@ -302,13 +302,13 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
         startGridWithConsistentId("A");
         startGridWithConsistentId("B");
 
-        boolean expectedExceptionThrown = false;
+        boolean expectedExThrown = false;
 
         try {
             startGridWithConsistentId("C");
         }
         catch (IgniteCheckedException e) {
-            expectedExceptionThrown = true;
+            expectedExThrown = true;
 
             if (e.getCause() != null && e.getCause().getCause() != null) {
                 Throwable rootCause = e.getCause().getCause();
@@ -320,7 +320,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
                 throw e;
         }
 
-        assertTrue("Expected exception wasn't thrown.", expectedExceptionThrown);
+        assertTrue("Expected exception wasn't thrown.", expectedExThrown);
     }
 
     /**
@@ -1010,13 +1010,13 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
 
         verifyBaselineTopologyOnNodes(nullVerifier, new Ignite[] {nodeA, nodeB});
 
-        boolean expectedExceptionThrown = false;
+        boolean expectedExThrown = false;
 
         try {
             startGridWithConsistentId("C");
         }
         catch (IgniteCheckedException e) {
-            expectedExceptionThrown = true;
+            expectedExThrown = true;
 
             if (e.getCause() != null && e.getCause().getCause() != null) {
                 Throwable rootCause = e.getCause().getCause();
@@ -1028,7 +1028,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
                 throw e;
         }
 
-        assertTrue("Expected exception wasn't thrown.", expectedExceptionThrown);
+        assertTrue("Expected exception wasn't thrown.", expectedExThrown);
     }
 
     /**
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCheckpointMapSnapshotTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCheckpointMapSnapshotTest.java
index 128b5922271..1203c582510 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCheckpointMapSnapshotTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCheckpointMapSnapshotTest.java
@@ -102,8 +102,8 @@ public class IgnitePdsCheckpointMapSnapshotTest extends GridCommonAbstractTest {
             WALPointer start,
             @Nullable IgniteBiPredicate<WALRecord.RecordType, WALPointer> recordDeserializeFilter
         ) throws IgniteCheckedException, StorageException {
-            Exception exception = new Exception();
-            StackTraceElement[] trace = exception.getStackTrace();
+            Exception ex = new Exception();
+            StackTraceElement[] trace = ex.getStackTrace();
 
             // Here we only want to record replays from GroupStateLazyStore
             // because they're performed if the snapshot doesn't include the data for a checkpoint
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java
index 5681d1e1799..9f44f357d43 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java
@@ -170,7 +170,7 @@ public class IgniteWALTailIsReachedDuringIterationOverArchiveTest extends GridCo
 
         WALPointer lastReadPtr = null;
 
-        boolean exception = false;
+        boolean ex = false;
 
         try (WALIterator it0 = it) {
             while (it0.hasNextX()) {
@@ -182,12 +182,12 @@ public class IgniteWALTailIsReachedDuringIterationOverArchiveTest extends GridCo
         catch (IgniteCheckedException e) {
             if (e.getMessage().contains("WAL tail reached in archive directory, WAL segment file is corrupted")
                 || e.getMessage().contains("WAL tail reached not in the last available segment"))
-                exception = true;
+                ex = true;
         }
 
         Assert.assertNotNull(lastReadPtr);
 
-        if (!exception) {
+        if (!ex) {
             fail("Last read ptr=" + lastReadPtr + ", corruptedPtr=" + corruptedPtr);
         }
     }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java
index fc4452c75c0..3af223e52da 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java
@@ -200,7 +200,7 @@ public abstract class IgniteAbstractWalIteratorInvalidCrcTest extends GridCommon
         if (shouldFail) {
             WALPointer[] lastReadPtrRef = new WALPointer[1];
 
-            IgniteException igniteException = (IgniteException)GridTestUtils.assertThrows(log, () -> {
+            IgniteException igniteEx = (IgniteException)GridTestUtils.assertThrows(log, () -> {
                 try (WALIterator iter = getWalIterator(walMgr, ignoreArchiveDir)) {
                     for (IgniteBiTuple<WALPointer, WALRecord> tuple : iter) {
                         WALPointer ptr = tuple.get1();
@@ -211,7 +211,7 @@ public abstract class IgniteAbstractWalIteratorInvalidCrcTest extends GridCommon
                 return null;
             }, IgniteException.class, "Failed to read WAL record");
 
-            assertTrue(igniteException.hasCause(IgniteDataIntegrityViolationException.class));
+            assertTrue(igniteEx.hasCause(IgniteDataIntegrityViolationException.class));
 
             WALPointer lastReadPtr = lastReadPtrRef[0];
             assertNotNull(lastReadPtr);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
index 82389744395..b0f65a6cc03 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
@@ -1272,7 +1272,7 @@ public class IgniteUtilsSelfTest extends GridCommonAbstractTest {
      */
     @Test
     public void testDoInParallelException() {
-        String expectedException = "ExpectedException";
+        String expectedEx = "ExpectedException";
 
         ExecutorService executorService = Executors
             .newSingleThreadExecutor(new IgniteThreadFactory("testscope", "ignite-utils-test"));
@@ -1284,7 +1284,7 @@ public class IgniteUtilsSelfTest extends GridCommonAbstractTest {
                 asList(1, 2, 3),
                 i -> {
                     if (Integer.valueOf(1).equals(i))
-                        throw new IgniteCheckedException(expectedException);
+                        throw new IgniteCheckedException(expectedEx);
 
                     return null;
                 }
@@ -1293,7 +1293,7 @@ public class IgniteUtilsSelfTest extends GridCommonAbstractTest {
             fail("Should throw ParallelExecutionException");
         }
         catch (IgniteCheckedException e) {
-            assertEquals(expectedException, e.getMessage());
+            assertEquals(expectedEx, e.getMessage());
         }
         finally {
             executorService.shutdownNow();
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java
index f9510ae8f36..cbafbfddbd9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java
@@ -422,13 +422,13 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
             futureOnDone(fut0, res0);
         }
 
-        boolean exceptionThrown = false;
+        boolean exThrown = false;
 
         try {
             chainedFut.get(1000);
         }
         catch (Exception e) {
-            exceptionThrown = true;
+            exThrown = true;
 
             if (cbException)
                 assertEquals("cbException", e.getMessage());
@@ -438,7 +438,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
                 throw e;
         }
 
-        assertEquals(withException || cbException, exceptionThrown);
+        assertEquals(withException || cbException, exThrown);
 
         assertTrue(chainedFut.isDone());
     }
diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/P2PClassLoadingFailureHandlingTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/P2PClassLoadingFailureHandlingTest.java
index 6a6d1661ef9..69a532432ce 100644
--- a/modules/core/src/test/java/org/apache/ignite/p2p/P2PClassLoadingFailureHandlingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/p2p/P2PClassLoadingFailureHandlingTest.java
@@ -153,9 +153,9 @@ public class P2PClassLoadingFailureHandlingTest extends GridCommonAbstractTest {
 
         Throwable ex = assertThrows(log, () -> client.compute(client.cluster().forRemotes()).execute(task, null),
             IgniteException.class, "Remote job threw user exception");
-        P2PClassNotFoundException p2PClassNotFoundException = X.cause(ex, P2PClassNotFoundException.class);
-        assertThat(p2PClassNotFoundException, is(notNullValue()));
-        assertThat(p2PClassNotFoundException.getMessage(), startsWith("Failed to peer load class"));
+        P2PClassNotFoundException p2PClassNotFoundEx = X.cause(ex, P2PClassNotFoundException.class);
+        assertThat(p2PClassNotFoundEx, is(notNullValue()));
+        assertThat(p2PClassNotFoundEx.getMessage(), startsWith("Failed to peer load class"));
 
         assertThatFailureHandlerIsNotCalled();
     }
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeJoinAndFailureTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeJoinAndFailureTest.java
index 5672779ac16..a79b5141159 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeJoinAndFailureTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeJoinAndFailureTest.java
@@ -228,7 +228,7 @@ public class TcpDiscoveryNodeJoinAndFailureTest extends GridCommonAbstractTest {
 
         nodeId = node2Id;
 
-        boolean expectedExceptionThrown = false;
+        boolean expectedExThrown = false;
 
         try {
             startGrid(NODE_WITH_PORT_ID_2);
@@ -249,10 +249,10 @@ public class TcpDiscoveryNodeJoinAndFailureTest extends GridCommonAbstractTest {
                 errorMsg.contains("Failed to connect to any address from IP finder")
             );
 
-            expectedExceptionThrown = true;
+            expectedExThrown = true;
         }
 
-        assertTrue("Expected exception was not thrown.", expectedExceptionThrown);
+        assertTrue("Expected exception was not thrown.", expectedExThrown);
 
         IgniteInternalFuture startGridFut = futureRef.get();
 
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 0ca832360e9..03da082f7bd 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -2231,7 +2231,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
                 // Fallback to previous mode.
                 ress = new ArrayList<>(argss.size());
 
-                SQLException batchException = null;
+                SQLException batchEx = null;
 
                 int[] cntPerRow = new int[argss.size()];
 
@@ -2258,15 +2258,15 @@ public class IgniteH2Indexing implements GridQueryIndexing {
                     catch (Exception e ) {
                         SQLException sqlEx = QueryUtils.toSqlException(e);
 
-                        batchException = DmlUtils.chainException(batchException, sqlEx);
+                        batchEx = DmlUtils.chainException(batchEx, sqlEx);
 
                         cntPerRow[cntr++] = Statement.EXECUTE_FAILED;
                     }
                 }
 
-                if (batchException != null) {
-                    BatchUpdateException e = new BatchUpdateException(batchException.getMessage(),
-                        batchException.getSQLState(), batchException.getErrorCode(), cntPerRow, batchException);
+                if (batchEx != null) {
+                    BatchUpdateException e = new BatchUpdateException(batchEx.getMessage(),
+                        batchEx.getSQLState(), batchEx.getErrorCode(), cntPerRow, batchEx);
 
                     throw new IgniteCheckedException(e);
                 }