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 2025/08/03 12:06:53 UTC

(shardingsphere) branch master updated: Fixes code format (#36161)

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

zhangliang 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 52b6cba79c4 Fixes code format (#36161)
52b6cba79c4 is described below

commit 52b6cba79c46c4f16c0e3a505a5f79b69b7bfc73
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sun Aug 3 20:06:47 2025 +0800

    Fixes code format (#36161)
---
 .../org/apache/shardingsphere/broadcast/rule/BroadcastRule.java     | 6 +++---
 .../infra/rule/attribute/datanode/MutableDataNodeRuleAttribute.java | 4 ++--
 .../single/rule/SingleMutableDataNodeRuleAttribute.java             | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/rule/BroadcastRule.java b/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/rule/BroadcastRule.java
index 070e19425c7..33917c4b1aa 100644
--- a/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/rule/BroadcastRule.java
+++ b/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/rule/BroadcastRule.java
@@ -49,12 +49,12 @@ public final class BroadcastRule implements DatabaseRule {
     
     private final RuleAttributes attributes;
     
-    public BroadcastRule(final BroadcastRuleConfiguration config, final Map<String, DataSource> dataSources, final Collection<ShardingSphereRule> builtRules) {
-        configuration = config;
+    public BroadcastRule(final BroadcastRuleConfiguration ruleConfig, final Map<String, DataSource> dataSources, final Collection<ShardingSphereRule> builtRules) {
+        configuration = ruleConfig;
         Map<String, DataSource> aggregatedDataSources = new RuleMetaData(builtRules).findAttribute(AggregatedDataSourceRuleAttribute.class)
                 .map(AggregatedDataSourceRuleAttribute::getAggregatedDataSources).orElseGet(() -> PhysicalDataSourceAggregator.getAggregatedDataSources(dataSources, builtRules));
         dataSourceNames = new CaseInsensitiveSet<>(aggregatedDataSources.keySet());
-        tables = new CaseInsensitiveSet<>(config.getTables());
+        tables = new CaseInsensitiveSet<>(ruleConfig.getTables());
         attributes = new RuleAttributes(new BroadcastDataNodeRuleAttribute(dataSourceNames, tables),
                 new BroadcastTableNamesRuleAttribute(tables), new AggregatedDataSourceRuleAttribute(aggregatedDataSources));
     }
diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/rule/attribute/datanode/MutableDataNodeRuleAttribute.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/rule/attribute/datanode/MutableDataNodeRuleAttribute.java
index a96af466eba..d022f204d6f 100644
--- a/infra/common/src/main/java/org/apache/shardingsphere/infra/rule/attribute/datanode/MutableDataNodeRuleAttribute.java
+++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/rule/attribute/datanode/MutableDataNodeRuleAttribute.java
@@ -69,11 +69,11 @@ public interface MutableDataNodeRuleAttribute extends RuleAttribute {
     /**
      * Reload single rule.
      *
-     * @param config rule configuration
+     * @param ruleConfig rule configuration
      * @param databaseName database name
      * @param dataSourceMap data source map
      * @param builtRules built rules
      * @return single rule
      */
-    ShardingSphereRule reloadRule(RuleConfiguration config, String databaseName, Map<String, DataSource> dataSourceMap, Collection<ShardingSphereRule> builtRules);
+    ShardingSphereRule reloadRule(RuleConfiguration ruleConfig, String databaseName, Map<String, DataSource> dataSourceMap, Collection<ShardingSphereRule> builtRules);
 }
diff --git a/kernel/single/core/src/main/java/org/apache/shardingsphere/single/rule/SingleMutableDataNodeRuleAttribute.java b/kernel/single/core/src/main/java/org/apache/shardingsphere/single/rule/SingleMutableDataNodeRuleAttribute.java
index 378bd822ecf..3845630d0a6 100644
--- a/kernel/single/core/src/main/java/org/apache/shardingsphere/single/rule/SingleMutableDataNodeRuleAttribute.java
+++ b/kernel/single/core/src/main/java/org/apache/shardingsphere/single/rule/SingleMutableDataNodeRuleAttribute.java
@@ -111,8 +111,8 @@ public final class SingleMutableDataNodeRuleAttribute implements MutableDataNode
     }
     
     @Override
-    public ShardingSphereRule reloadRule(final RuleConfiguration config, final String databaseName, final Map<String, DataSource> dataSourceMap,
+    public ShardingSphereRule reloadRule(final RuleConfiguration ruleConfig, final String databaseName, final Map<String, DataSource> dataSourceMap,
                                          final Collection<ShardingSphereRule> builtRules) {
-        return new SingleRule((SingleRuleConfiguration) config, databaseName, protocolType, dataSourceMap, builtRules);
+        return new SingleRule((SingleRuleConfiguration) ruleConfig, databaseName, protocolType, dataSourceMap, builtRules);
     }
 }