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

zhangliang 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 6413eef5659 Refactor StorageUnitNodeMapCreator (#36923)
6413eef5659 is described below

commit 6413eef565930b36cc5e516f2d42b869a45ae557
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Oct 22 20:51:34 2025 +0800

    Refactor StorageUnitNodeMapCreator (#36923)
---
 .../metadata/database/resource/unit/StorageUnitNodeMapCreator.java  | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/unit/StorageUnitNodeMapCreator.java
 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/unit/StorageUnitNodeMapCreator.java
index 2c1f5c7ef4a..114435e24be 100644
--- 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/unit/StorageUnitNodeMapCreator.java
+++ 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/unit/StorageUnitNodeMapCreator.java
@@ -51,10 +51,8 @@ public final class StorageUnitNodeMapCreator {
     
     private static StorageNode create(final String storageUnitName, final 
DataSourcePoolProperties props) {
         Map<String, Object> standardProps = 
props.getConnectionPropertySynonyms().getStandardProperties();
-        return create(storageUnitName, standardProps.get("url").toString(), 
standardProps.get("username").toString());
-    }
-    
-    private static StorageNode create(final String storageUnitName, final 
String url, final String username) {
+        String url = standardProps.get("url").toString();
+        String username = standardProps.get("username").toString();
         boolean isInstanceConnectionAvailable = new 
DatabaseTypeRegistry(DatabaseTypeFactory.get(url)).getDialectDatabaseMetaData().getConnectionOption().isInstanceConnectionAvailable();
         try {
             ConnectionProperties connectionProps = 
DatabaseTypedSPILoader.getService(ConnectionPropertiesParser.class, 
DatabaseTypeFactory.get(url)).parse(url, username, null);

Reply via email to