diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/StorageResourceUtils.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/StorageResourceUtils.java index 62fda0c02b2d2..845b681263488 100644 --- a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/StorageResourceUtils.java +++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/resource/StorageResourceUtils.java @@ -58,14 +58,7 @@ public static Map getStorageUnitNodeMappers(final .collect(Collectors.toMap(Entry::getKey, entry -> getStorageUnitNodeMapper(entry.getKey(), entry.getValue()), (oldValue, currentValue) -> currentValue, LinkedHashMap::new)); } - /** - * Get storage unit node mapper from provided data source. - * - * @param dataSourceName data source name - * @param dataSource data source - * @return storage unit node mapper - */ - public static StorageUnitNodeMapper getStorageUnitNodeMapper(final String dataSourceName, final DataSource dataSource) { + private static StorageUnitNodeMapper getStorageUnitNodeMapper(final String dataSourceName, final DataSource dataSource) { DataSourcePoolProperties props = DataSourcePoolPropertiesCreator.create(dataSource); String url = props.getConnectionPropertySynonyms().getStandardProperties().get("url").toString(); return new StorageUnitNodeMapper(dataSourceName, new StorageNode(dataSourceName), url);