You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2023/06/29 14:40:01 UTC

[shardingsphere] branch master updated: Fix sonar issue on ShardingSpherePipelineDataSourceCreator (#26701)

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

zhaojinchao 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 c63c7fc7bfa Fix sonar issue on ShardingSpherePipelineDataSourceCreator (#26701)
c63c7fc7bfa is described below

commit c63c7fc7bfa49a6a0cda22f6dd3fbbff9e5f2d06
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Thu Jun 29 22:39:53 2023 +0800

    Fix sonar issue on ShardingSpherePipelineDataSourceCreator (#26701)
---
 .../datasource/creator/ShardingSpherePipelineDataSourceCreator.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/data/pipeline/datasource/creator/ShardingSpherePipelineDataSourceCreator.java b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/data/pipeline/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
index 8705a49c477..c1e894e6c18 100644
--- a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/data/pipeline/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
+++ b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/data/pipeline/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
@@ -55,7 +55,7 @@ public final class ShardingSpherePipelineDataSourceCreator implements PipelineDa
     }
     
     private void updateSingleRuleConfiguration(final YamlRootConfiguration rootConfig) {
-        rootConfig.getRules().removeIf(each -> each instanceof YamlSingleRuleConfiguration);
+        rootConfig.getRules().removeIf(YamlSingleRuleConfiguration.class::isInstance);
         YamlSingleRuleConfiguration singleRuleConfig = new YamlSingleRuleConfiguration();
         singleRuleConfig.setTables(Collections.singletonList(SingleTableConstants.ALL_TABLES));
         rootConfig.getRules().add(singleRuleConfig);