You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2021/08/13 05:33:21 UTC

[shardingsphere] branch master updated: Minor refactor (#11797)

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 f6cdc15  Minor refactor (#11797)
f6cdc15 is described below

commit f6cdc15a309d9982f9763c01737d6a23b49be218
Author: Haoran Meng <me...@gmail.com>
AuthorDate: Fri Aug 13 13:32:46 2021 +0800

    Minor refactor (#11797)
---
 .../apache/shardingsphere/proxy/config/ProxyConfigurationLoader.java   | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/ProxyConfigurationLoader.java b/shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/ProxyConfigurationLoader.java
index a32b850..be509ce 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/ProxyConfigurationLoader.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/ProxyConfigurationLoader.java
@@ -59,9 +59,6 @@ public final class ProxyConfigurationLoader {
         YamlProxyServerConfiguration serverConfig = loadServerConfiguration(getResourceFile(String.join("/", path, SERVER_CONFIG_FILE)));
         File configPath = getResourceFile(path);
         Collection<YamlProxyRuleConfiguration> ruleConfigs = loadRuleConfigurations(configPath);
-        // TODO use SPI with pluggable
-        boolean containsGovernance = serverConfig.getRules().stream().anyMatch(each -> each instanceof YamlGovernanceConfiguration);
-        Preconditions.checkState(!ruleConfigs.isEmpty() || containsGovernance, "Can not find any valid rule configurations file in path `%s`.", configPath.getPath());
         return new YamlProxyConfiguration(serverConfig, ruleConfigs.stream().collect(Collectors.toMap(
                 YamlProxyRuleConfiguration::getSchemaName, each -> each, (oldValue, currentValue) -> oldValue, LinkedHashMap::new)));
     }