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 2022/02/23 11:36:45 UTC
[shardingsphere] branch master updated: Remove check data source empty. (#15596)
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 c34b410 Remove check data source empty. (#15596)
c34b410 is described below
commit c34b410cf06d970f60ff81d761b843541b47feb6
Author: zhaojinchao <33...@users.noreply.github.com>
AuthorDate: Wed Feb 23 19:35:41 2022 +0800
Remove check data source empty. (#15596)
* Remove check data source empty
* update
---
.../apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRule.java | 2 --
1 file changed, 2 deletions(-)
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRule.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRule.java
index d13d8cc..8141000 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRule.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRule.java
@@ -17,7 +17,6 @@
package org.apache.shardingsphere.dbdiscovery.rule;
-import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import lombok.Getter;
import org.apache.shardingsphere.dbdiscovery.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
@@ -81,7 +80,6 @@ public final class DatabaseDiscoveryRule implements SchemaRule, DataSourceContai
private DatabaseDiscoveryRule(final String schemaName, final Map<String, DataSource> dataSourceMap, final Collection<DatabaseDiscoveryDataSourceRuleConfiguration> dataSourceRuleConfigs,
final Map<String, DatabaseDiscoveryHeartBeatConfiguration> heartBeatConfig, final Map<String, DatabaseDiscoveryType> discoveryTypes) {
- Preconditions.checkState(!dataSourceMap.isEmpty(), "Data source can not be empty.");
this.discoveryTypes = discoveryTypes;
dataSourceRules = getDataSourceRules(dataSourceRuleConfigs, heartBeatConfig);
findMasterSlaveRelation(schemaName, dataSourceMap);