From 6284e1283d1391e605d0b1dc7a98d70256214f8b Mon Sep 17 00:00:00 2001 From: zhangliang Date: Fri, 6 Oct 2023 01:17:33 +0800 Subject: [PATCH] Refactor StorageNode --- .../database/resource/unit/StorageUnitNodeMapUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/unit/StorageUnitNodeMapUtils.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/unit/StorageUnitNodeMapUtils.java index 6b65846163992..67d885f668535 100644 --- a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/unit/StorageUnitNodeMapUtils.java +++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/unit/StorageUnitNodeMapUtils.java @@ -92,6 +92,6 @@ private static StorageNodeName getStorageNodeName(final String dataSourceName, f } private static StorageNode createStorageNode(final StorageNodeName storageNodeName, final String url, final boolean isInstanceConnectionAvailable) { - return isInstanceConnectionAvailable ? new StorageNode(storageNodeName, url, new StandardJdbcUrlParser().parse(url).getDatabase()) : new StorageNode(storageNodeName, url, null); + return new StorageNode(storageNodeName, url, isInstanceConnectionAvailable ? new StandardJdbcUrlParser().parse(url).getDatabase() : null); } }