You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2021/09/30 12:11:12 UTC

[shardingsphere] branch master updated: For checkstyle (#12865)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new fab11d1  For checkstyle (#12865)
fab11d1 is described below

commit fab11d1b16251e3f8bc16001c8700ad917ce4068
Author: Liang Zhang <te...@163.com>
AuthorDate: Thu Sep 30 20:10:32 2021 +0800

    For checkstyle (#12865)
---
 ...plication-shadow-readwrite-splitting.properties |  2 +-
 .../update/AlterShadowRuleStatementUpdater.java    |  5 +---
 ...neratedKeyInsertValueParameterRewriterTest.java | 28 ++++++++++------------
 .../ShardingPaginationParameterRewriterTest.java   | 24 +++++++------------
 .../query/ShardingAlgorithmQueryResultSet.java     |  2 +-
 .../CreateShardingTableRuleStatementUpdater.java   |  2 +-
 .../DropShardingAlgorithmStatementUpdater.java     |  7 +++---
 .../cluster/ClusterContextManagerBuilder.java      |  2 +-
 .../core/job/check/EnvironmentCheckerFactory.java  |  1 -
 .../integration/scaling/test/mysql/ScalingIT.java  |  4 +---
 .../segment/distsql/rdl/ShadowRuleAssert.java      |  4 +---
 11 files changed, 31 insertions(+), 50 deletions(-)

diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/future-shadow-example/future-shadow-spring-boot-mybatis-example/src/main/resources/application-shadow-readwrite-splitting.properties b/examples/shardingsphere-jdbc-example/other-feature-example/future-shadow-example/future-shadow-spring-boot-mybatis-example/src/main/resources/application-shadow-readwrite-splitting.properties
index d3da0a7..1677b69 100644
--- a/examples/shardingsphere-jdbc-example/other-feature-example/future-shadow-example/future-shadow-spring-boot-mybatis-example/src/main/resources/application-shadow-readwrite-splitting.properties
+++ b/examples/shardingsphere-jdbc-example/other-feature-example/future-shadow-example/future-shadow-spring-boot-mybatis-example/src/main/resources/application-shadow-readwrite-splitting.properties
@@ -73,4 +73,4 @@ spring.shardingsphere.rules.shadow.shadow-algorithms.user-id-select-match-algori
 
 spring.shardingsphere.rules.shadow.shadow-algorithms.simple-note-algorithm.type=SIMPLE_NOTE
 spring.shardingsphere.rules.shadow.shadow-algorithms.simple-note-algorithm.props.shadow=true
-spring.shardingsphere.rules.shadow.shadow-algorithms.simple-note-algorithm.props.foo=bar
\ No newline at end of file
+spring.shardingsphere.rules.shadow.shadow-algorithms.simple-note-algorithm.props.foo=bar
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterShadowRuleStatementUpdater.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterShadowRuleStatementUpdater.java
index ef198de..0b2320e 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterShadowRuleStatementUpdater.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterShadowRuleStatementUpdater.java
@@ -39,7 +39,6 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
-
 /**
  * Alter shadow rule statement updater.
  */
@@ -60,9 +59,7 @@ public final class AlterShadowRuleStatementUpdater implements RuleDefinitionAlte
     }
     
     private void updateDataSources(final ShadowRuleConfiguration currentRuleConfig, final Map<String, ShadowDataSourceConfiguration> toBeAlteredDataSources) {
-        currentRuleConfig.getTables().values().forEach(tableConfig -> {
-            tableConfig.getDataSourceNames().removeIf(toBeAlteredDataSources::containsKey);
-        });
+        currentRuleConfig.getTables().values().forEach(tableConfig -> tableConfig.getDataSourceNames().removeIf(toBeAlteredDataSources::containsKey));
         currentRuleConfig.getDataSources().putAll(toBeAlteredDataSources);
     }
     
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameter/ShardingGeneratedKeyInsertValueParameterRewriterTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameter/ShardingGeneratedKeyInsertValueParameterRewriterTest.java
index 1f4e39f..a18f4ea 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameter/ShardingGeneratedKeyInsertValueParameterRewriterTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameter/ShardingGeneratedKeyInsertValueParameterRewriterTest.java
@@ -24,7 +24,6 @@ import org.apache.shardingsphere.infra.rewrite.parameter.builder.impl.GroupedPar
 import org.apache.shardingsphere.infra.rewrite.parameter.builder.impl.StandardParameterBuilder;
 import org.apache.shardingsphere.sharding.rewrite.parameter.impl.ShardingGeneratedKeyInsertValueParameterRewriter;
 import org.junit.Test;
-import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
 import java.util.ArrayList;
@@ -36,8 +35,8 @@ import java.util.Map;
 
 import static org.hamcrest.CoreMatchers.hasItem;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.anyCollection;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
@@ -46,11 +45,11 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
 public final class ShardingGeneratedKeyInsertValueParameterRewriterTest {
-
+    
     private static final int TEST_PARAMETER_COUNT = 3;
-
+    
     private static final String TEST_GENERATED_VALUE = "testGeneratedValue";
-
+    
     @Test
     public void assertIsNeedRewrite() {
         ShardingGeneratedKeyInsertValueParameterRewriter shardingGeneratedKeyInsertValueParameterRewriter = new ShardingGeneratedKeyInsertValueParameterRewriter();
@@ -66,7 +65,7 @@ public final class ShardingGeneratedKeyInsertValueParameterRewriterTest {
         when(insertStatementContext.getGeneratedKeyContext().get().getGeneratedValues().isEmpty()).thenReturn(Boolean.FALSE);
         assertTrue(shardingGeneratedKeyInsertValueParameterRewriter.isNeedRewrite(insertStatementContext));
     }
-
+    
     @Test
     public void assertRewrite() {
         InsertStatementContext insertStatementContext = getInsertStatementContext();
@@ -75,19 +74,16 @@ public final class ShardingGeneratedKeyInsertValueParameterRewriterTest {
         shardingGeneratedKeyInsertValueParameterRewriter.rewrite(groupedParameterBuilder, insertStatementContext, null);
         assertThat(((GroupedParameterBuilder) groupedParameterBuilder).getParameterBuilders().get(0).getAddedIndexAndParameters().get(TEST_PARAMETER_COUNT), hasItem(TEST_GENERATED_VALUE));
     }
-
+    
     private ParameterBuilder getParameterBuilder() {
         StandardParameterBuilder standardParameterBuilder = mock(StandardParameterBuilder.class);
         Map<Integer, Collection<Object>> addedIndexAndParameters = new HashMap<>();
         when(standardParameterBuilder.getAddedIndexAndParameters()).thenReturn(addedIndexAndParameters);
-        doAnswer(new Answer<Void>() {
-            @Override
-            public Void answer(final InvocationOnMock invocation) throws Throwable {
-                int index = invocation.getArgument(0);
-                Collection<Object> parameters = invocation.getArgument(1);
-                addedIndexAndParameters.put(index, parameters);
-                return null;
-            }
+        doAnswer((Answer<Void>) invocation -> {
+            int index = invocation.getArgument(0);
+            Collection<Object> parameters = invocation.getArgument(1);
+            addedIndexAndParameters.put(index, parameters);
+            return null;
         }).when(standardParameterBuilder).addAddedParameters(anyInt(), anyCollection());
         List<StandardParameterBuilder> parameterBuildersList = new ArrayList<>();
         parameterBuildersList.add(standardParameterBuilder);
@@ -95,7 +91,7 @@ public final class ShardingGeneratedKeyInsertValueParameterRewriterTest {
         when(result.getParameterBuilders()).thenReturn(parameterBuildersList);
         return result;
     }
-
+    
     private InsertStatementContext getInsertStatementContext() {
         InsertStatementContext result = mock(InsertStatementContext.class, RETURNS_DEEP_STUBS);
         when(result.getGeneratedKeyContext().isPresent()).thenReturn(Boolean.TRUE);
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameter/ShardingPaginationParameterRewriterTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameter/ShardingPaginationParameterRewriterTest.java
index 0e107ac..982bd49 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameter/ShardingPaginationParameterRewriterTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameter/ShardingPaginationParameterRewriterTest.java
@@ -24,7 +24,6 @@ import org.apache.shardingsphere.infra.rewrite.parameter.builder.impl.StandardPa
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.sharding.rewrite.parameter.impl.ShardingPaginationParameterRewriter;
 import org.junit.Test;
-import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
 import java.util.Optional;
@@ -74,21 +73,16 @@ public final class ShardingPaginationParameterRewriterTest {
         addOffsetParametersFlag = false;
         addRowCountParameterFlag = false;
         StandardParameterBuilder standardParameterBuilder = mock(StandardParameterBuilder.class);
-        doAnswer(new Answer<Void>() {
-            @Override
-            public Void answer(final InvocationOnMock invocation) throws Throwable {
-                int index = invocation.getArgument(0);
-                long parameter = invocation.getArgument(1);
-                if (index == TEST_OFFSET_PARAMETER_INDEX
-                        && parameter == TEST_REVISED_OFFSET) {
-                    addOffsetParametersFlag = true;
-                }
-                if (index == TEST_ROW_COUNT_PARAMETER_INDEX
-                        && parameter == TEST_REVISED_ROW_COUNT) {
-                    addRowCountParameterFlag = true;
-                }
-                return null;
+        doAnswer((Answer<Void>) invocation -> {
+            int index = invocation.getArgument(0);
+            long parameter = invocation.getArgument(1);
+            if (index == TEST_OFFSET_PARAMETER_INDEX && parameter == TEST_REVISED_OFFSET) {
+                addOffsetParametersFlag = true;
             }
+            if (index == TEST_ROW_COUNT_PARAMETER_INDEX && parameter == TEST_REVISED_ROW_COUNT) {
+                addRowCountParameterFlag = true;
+            }
+            return null;
         }).when(standardParameterBuilder).addReplacedParameters(anyInt(), anyLong());
         SelectStatementContext selectStatementContext = mock(SelectStatementContext.class);
         PaginationContext pagination = mock(PaginationContext.class);
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShardingAlgorithmQueryResultSet.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShardingAlgorithmQueryResultSet.java
index fc3416e..0bba598 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShardingAlgorithmQueryResultSet.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShardingAlgorithmQueryResultSet.java
@@ -46,7 +46,7 @@ public final class ShardingAlgorithmQueryResultSet implements DistSQLResultSet {
     public void init(final ShardingSphereMetaData metaData, final SQLStatement sqlStatement) {
         Optional<ShardingRuleConfiguration> ruleConfig = metaData.getRuleMetaData().getConfigurations()
                 .stream().filter(each -> each instanceof ShardingRuleConfiguration).map(each -> (ShardingRuleConfiguration) each).findAny();
-        data = ruleConfig.map(option -> option.getShardingAlgorithms()).orElse(Collections.emptyMap()).entrySet().iterator();
+        data = ruleConfig.map(ShardingRuleConfiguration::getShardingAlgorithms).orElse(Collections.emptyMap()).entrySet().iterator();
     }
     
     @Override
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingTableRuleStatementUpdater.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingTableRuleStatementUpdater.java
index e891af6..5b3c772 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingTableRuleStatementUpdater.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingTableRuleStatementUpdater.java
@@ -91,7 +91,7 @@ public final class CreateShardingTableRuleStatementUpdater implements RuleDefini
     private void checkToBeCreatedResource(final String schemaName, final CreateShardingTableRuleStatement sqlStatement, final ShardingSphereResource resource, 
                                           final Collection<String> extraResources) throws RequiredResourceMissedException {
         Collection<String> notExistedResources = resource.getNotExistedResources(getToBeCreatedResources(sqlStatement));
-        notExistedResources.removeIf(each -> extraResources.contains(each));
+        notExistedResources.removeIf(extraResources::contains);
         if (!notExistedResources.isEmpty()) {
             throw new RequiredResourceMissedException(schemaName, notExistedResources);
         }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingAlgorithmStatementUpdater.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingAlgorithmStatementUpdater.java
index 5467c10..155f591 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingAlgorithmStatementUpdater.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingAlgorithmStatementUpdater.java
@@ -70,7 +70,7 @@ public final class DropShardingAlgorithmStatementUpdater implements RuleDefiniti
     
     private Collection<String> getAllOfAlgorithmsInUsed(final ShardingRuleConfiguration shardingRuleConfig) {
         Collection<String> result = new LinkedHashSet<>();
-        shardingRuleConfig.getTables().stream().forEach(each -> {
+        shardingRuleConfig.getTables().forEach(each -> {
             if (Objects.nonNull(each.getDatabaseShardingStrategy())) {
                 result.add(each.getDatabaseShardingStrategy().getShardingAlgorithmName());
             }
@@ -78,8 +78,7 @@ public final class DropShardingAlgorithmStatementUpdater implements RuleDefiniti
                 result.add(each.getTableShardingStrategy().getShardingAlgorithmName());
             }
         });
-        shardingRuleConfig.getAutoTables().stream().filter(each -> Objects.nonNull(each.getShardingStrategy()))
-                .forEach(each -> result.add(each.getShardingStrategy().getShardingAlgorithmName()));
+        shardingRuleConfig.getAutoTables().stream().filter(each -> Objects.nonNull(each.getShardingStrategy())).forEach(each -> result.add(each.getShardingStrategy().getShardingAlgorithmName()));
         return result;
     }
     
@@ -96,7 +95,7 @@ public final class DropShardingAlgorithmStatementUpdater implements RuleDefiniti
     }
     
     private void dropShardingAlgorithm(final ShardingRuleConfiguration currentRuleConfig, final String algorithmName) {
-        getCurrentShardingAlgorithms(currentRuleConfig).removeIf(key -> algorithmName.equalsIgnoreCase(key));
+        getCurrentShardingAlgorithms(currentRuleConfig).removeIf(algorithmName::equalsIgnoreCase);
     }
     
     @Override
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
index 5e47dfd..2db0000 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
@@ -247,7 +247,7 @@ public final class ClusterContextManagerBuilder implements ContextManagerBuilder
     }
     
     private void persistMetaData(final Map<String, ShardingSphereSchema> schemas) {
-        schemas.entrySet().forEach(entry -> metaDataPersistService.getSchemaMetaDataService().persist(entry.getKey(), entry.getValue()));
+        schemas.forEach((key, value) -> metaDataPersistService.getSchemaMetaDataService().persist(key, value));
     }
     
     @Override
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/job/check/EnvironmentCheckerFactory.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/job/check/EnvironmentCheckerFactory.java
index 8b32321..1709199 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/job/check/EnvironmentCheckerFactory.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/job/check/EnvironmentCheckerFactory.java
@@ -31,7 +31,6 @@ import org.apache.shardingsphere.scaling.core.spi.ScalingEntryLoader;
  */
 public final class EnvironmentCheckerFactory {
     
-    
     /**
      * Create data consistency checker instance.
      *
diff --git a/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/ScalingIT.java b/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/ScalingIT.java
index 72dd8a4..858cd34 100644
--- a/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/ScalingIT.java
+++ b/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/ScalingIT.java
@@ -67,9 +67,7 @@ public final class ScalingIT {
     }
     
     private void waitInventoryFinish(final String jobId) {
-        new ExecuteUtil(() -> {
-            return "EXECUTE_INCREMENTAL_TASK".equals(ScalingUtil.getInstance().getJobStatus(jobId));
-        }, (int) (TIMEOUT_MS - WAIT_MS_BEFORE_START_JOB) / (10 * 1000), 10 * 1000).execute();
+        new ExecuteUtil(() -> "EXECUTE_INCREMENTAL_TASK".equals(ScalingUtil.getInstance().getJobStatus(jobId)), (int) (TIMEOUT_MS - WAIT_MS_BEFORE_START_JOB) / (10 * 1000), 10 * 1000).execute();
     }
     
     @SneakyThrows(IOException.class)
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/distsql/rdl/ShadowRuleAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/distsql/rdl/ShadowRuleAssert.java
index b390ce0..250495c 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/distsql/rdl/ShadowRuleAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/distsql/rdl/ShadowRuleAssert.java
@@ -70,9 +70,7 @@ public final class ShadowRuleAssert {
                                            final Collection<ExpectedShadowAlgorithm> expected) {
         assertNotNull(actual);
         Map<String, ShadowAlgorithmSegment> actualMap = actual.stream().collect(Collectors.toMap(ShadowAlgorithmSegment::getAlgorithmName, each -> each));
-        expected.forEach(each -> {
-            assertIsAlgorithmsSegment(assertContext, actualMap.get(each.getAlgorithmName()), each);
-        });
+        expected.forEach(each -> assertIsAlgorithmsSegment(assertContext, actualMap.get(each.getAlgorithmName()), each));
     }
     
     private static void assertIsAlgorithmsSegment(final SQLCaseAssertContext assertContext, final ShadowAlgorithmSegment actual,