terrymanu commented on a change in pull request #12135:
URL: https://github.com/apache/shardingsphere/pull/12135#discussion_r699330905



##########
File path: 
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/mode/ModeConfigurationYamlSwapper.java
##########
@@ -40,8 +39,10 @@ public YamlModeConfiguration swapToYamlConfiguration(final 
ModeConfiguration dat
     
     @Override
     public ModeConfiguration swapToObject(final YamlModeConfiguration 
yamlConfig) {
-        PersistRepositoryConfiguration repositoryConfig = null == 
yamlConfig.getRepository()
-                ? null : new 
PersistRepositoryConfigurationYamlSwapperEngine().swapToObject(yamlConfig.getType(),
 yamlConfig.getRepository());
-        return new ModeConfiguration(yamlConfig.getType(), repositoryConfig, 
yamlConfig.isOverwrite());
+        if (null == yamlConfig || null == yamlConfig.getRepository()) {
+            return new ModeConfiguration("Memory", null, false);

Review comment:
       Please avoid use type details such as `Memory` in the up level code.
   Just use RequiredSPI to resolve it.




-- 
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