zjcnb commented on code in PR #20475:
URL: https://github.com/apache/shardingsphere/pull/20475#discussion_r955663112


##########
shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsFactory.java:
##########
@@ -79,4 +83,14 @@ private static DatabaseConfiguration 
createEffectiveDatabaseConfiguration(final
         Collection<RuleConfiguration> databaseRuleConfigs = 
persistService.getDatabaseRulePersistService().load(databaseName);
         return new 
DataSourceProvidedDatabaseConfiguration(effectiveDataSources, 
databaseRuleConfigs);
     }
+    
+    private static Map<String, ShardingSphereDatabase> reloadDatabases(final 
Map<String, ShardingSphereDatabase> databases, final MetaDataPersistService 
persistService) {
+        Map<String, ShardingSphereDatabase> result = new 
ConcurrentHashMap<>(databases.size(), 1);

Review Comment:
   > `Collections.singletonMap()` may make this more elegant ?
   
   I think you are right when i know the key and value explicitly. But no 
define value here.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to