You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2022/06/27 04:44:10 UTC
[shardingsphere] branch master updated: Remove useless findRuleConfigurations in ShardingSphereRuleMetaData (#18623)
This is an automated email from the ASF dual-hosted git repository.
panjuan 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 892a6b8f0ff Remove useless findRuleConfigurations in ShardingSphereRuleMetaData (#18623)
892a6b8f0ff is described below
commit 892a6b8f0ff85b753191669f42198f1c927f6f80
Author: Zhengqiang Duan <du...@apache.org>
AuthorDate: Mon Jun 27 12:44:04 2022 +0800
Remove useless findRuleConfigurations in ShardingSphereRuleMetaData (#18623)
---
.../database/rule/ShardingSphereRuleMetaData.java | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/rule/ShardingSphereRuleMetaData.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/rule/ShardingSphereRuleMetaData.java
index 5e6f7ed0a4e..98d488fd984 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/rule/ShardingSphereRuleMetaData.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/rule/ShardingSphereRuleMetaData.java
@@ -91,21 +91,4 @@ public final class ShardingSphereRuleMetaData {
Preconditions.checkState(1 == foundRules.size(), "Rule `%s` should have and only have one instance.", clazz.getSimpleName());
return foundRules.iterator().next();
}
-
- /**
- * Find rule configuration by class.
- *
- * @param clazz target class
- * @param <T> type of rule configuration
- * @return found rule configurations
- */
- public <T extends RuleConfiguration> Collection<T> findRuleConfigurations(final Class<T> clazz) {
- Collection<T> result = new LinkedList<>();
- for (ShardingSphereRule each : rules) {
- if (clazz.isAssignableFrom(each.getConfiguration().getClass())) {
- result.add(clazz.cast(each.getConfiguration()));
- }
- }
- return result;
- }
}