This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 aa5081afff7 Modify the dataSourceName property in the SingleRule class
to use CaseInsensitiveSet (#33235)
aa5081afff7 is described below
commit aa5081afff7efc1c4e83c38b116c7e5bca48d5cf
Author: ZhangCheng <[email protected]>
AuthorDate: Mon Oct 14 11:14:24 2024 +0800
Modify the dataSourceName property in the SingleRule class to use
CaseInsensitiveSet (#33235)
---
.../main/java/org/apache/shardingsphere/single/rule/SingleRule.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/kernel/single/core/src/main/java/org/apache/shardingsphere/single/rule/SingleRule.java
b/kernel/single/core/src/main/java/org/apache/shardingsphere/single/rule/SingleRule.java
index 200cba9a07a..473026ea5a4 100644
---
a/kernel/single/core/src/main/java/org/apache/shardingsphere/single/rule/SingleRule.java
+++
b/kernel/single/core/src/main/java/org/apache/shardingsphere/single/rule/SingleRule.java
@@ -17,6 +17,7 @@
package org.apache.shardingsphere.single.rule;
+import com.cedarsoftware.util.CaseInsensitiveSet;
import lombok.Getter;
import
org.apache.shardingsphere.infra.binder.context.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.binder.context.type.IndexAvailable;
@@ -71,7 +72,7 @@ public final class SingleRule implements DatabaseRule {
configuration = ruleConfig;
defaultDataSource = ruleConfig.getDefaultDataSource().orElse(null);
Map<String, DataSource> aggregateDataSourceMap =
PhysicalResourceAggregator.getAggregatedResources(dataSourceMap, builtRules);
- dataSourceNames = aggregateDataSourceMap.keySet();
+ dataSourceNames = new
CaseInsensitiveSet<>(aggregateDataSourceMap.keySet());
this.protocolType = protocolType;
singleTableDataNodes = SingleTableDataNodeLoader.load(databaseName,
protocolType, aggregateDataSourceMap, builtRules, configuration.getTables());
SingleTableMapperRuleAttribute tableMapperRuleAttribute = new
SingleTableMapperRuleAttribute(singleTableDataNodes.values());