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/10/09 03:47:06 UTC
[shardingsphere] branch master updated: Fix NPE when all data sources are unavailable (#21412)
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 ada66afa030 Fix NPE when all data sources are unavailable (#21412)
ada66afa030 is described below
commit ada66afa030693f7d83a72ca3918a90c78f75e56
Author: ZhangCheng <fl...@outlook.com>
AuthorDate: Sun Oct 9 11:46:57 2022 +0800
Fix NPE when all data sources are unavailable (#21412)
---
.../infra/metadata/database/resource/ShardingSphereResource.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/ShardingSphereResource.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/ShardingSphereResource.java
index 43598b352d5..76b917fd30d 100644
--- a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/ShardingSphereResource.java
+++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/ShardingSphereResource.java
@@ -54,7 +54,7 @@ public final class ShardingSphereResource {
}
private DatabaseType getDatabaseType(final Map<String, DataSource> dataSources) {
- return dataSources.isEmpty() ? null : DatabaseTypeEngine.getDatabaseType(dataSources.values());
+ return DatabaseTypeEngine.getDatabaseType(dataSources.values());
}
private Map<String, DataSourceMetaData> createDataSourceMetaDataMap(final Map<String, DataSource> dataSources) {