You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2023/10/11 13:22:07 UTC

[shardingsphere] branch master updated: Remove useless null check (#28722)

This is an automated email from the ASF dual-hosted git repository.

zhonghongsheng 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 ceae2accc31 Remove useless null check (#28722)
ceae2accc31 is described below

commit ceae2accc315cab6a77ab1c5955a3fe4e9e68d10
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Wed Oct 11 21:21:57 2023 +0800

    Remove useless null check (#28722)
---
 .../mode/manager/context/ConfigurationContextManager.java               | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mode/core/src/main/java/org/apache/shardingsphere/mode/manager/context/ConfigurationContextManager.java b/mode/core/src/main/java/org/apache/shardingsphere/mode/manager/context/ConfigurationContextManager.java
index e1b4b029f51..2798809e460 100644
--- a/mode/core/src/main/java/org/apache/shardingsphere/mode/manager/context/ConfigurationContextManager.java
+++ b/mode/core/src/main/java/org/apache/shardingsphere/mode/manager/context/ConfigurationContextManager.java
@@ -365,7 +365,7 @@ public final class ConfigurationContextManager {
     
     private Map<StorageNode, DataSource> getMergedStorageNodeDataSources(final ResourceMetaData currentResourceMetaData, final SwitchingResource switchingResource) {
         Map<StorageNode, DataSource> result = currentResourceMetaData.getDataSources();
-        if (null != switchingResource && null != switchingResource.getNewDataSources() && !switchingResource.getNewDataSources().isEmpty()) {
+        if (null != switchingResource && !switchingResource.getNewDataSources().isEmpty()) {
             result.putAll(switchingResource.getNewDataSources());
         }
         return result;