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 86608d1a43e Code format for YamlModeConfigurationSwapper (#32455)
86608d1a43e is described below
commit 86608d1a43efea9b6db8d7a30379f4ecc70747e2
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Aug 10 17:56:42 2024 +0800
Code format for YamlModeConfigurationSwapper (#32455)
---
.../yaml/config/swapper/mode/YamlModeConfigurationSwapper.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
a/infra/common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/mode/YamlModeConfigurationSwapper.java
b/infra/common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/mode/YamlModeConfigurationSwapper.java
index 65745c68fc8..1cd4d42b3aa 100644
---
a/infra/common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/mode/YamlModeConfigurationSwapper.java
+++
b/infra/common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/mode/YamlModeConfigurationSwapper.java
@@ -34,8 +34,7 @@ public final class YamlModeConfigurationSwapper implements
YamlConfigurationSwap
YamlModeConfiguration result = new YamlModeConfiguration();
result.setType(data.getType());
if (null != data.getRepository()) {
-
YamlPersistRepositoryConfigurationSwapper<PersistRepositoryConfiguration>
swapper = TypedSPILoader.getService(
- YamlPersistRepositoryConfigurationSwapper.class,
data.getType());
+
YamlPersistRepositoryConfigurationSwapper<PersistRepositoryConfiguration>
swapper =
TypedSPILoader.getService(YamlPersistRepositoryConfigurationSwapper.class,
data.getType());
result.setRepository(swapper.swapToYamlConfiguration(data.getRepository()));
}
return result;
@@ -46,8 +45,7 @@ public final class YamlModeConfigurationSwapper implements
YamlConfigurationSwap
if (null == yamlConfig.getRepository()) {
return new ModeConfiguration(yamlConfig.getType(), null);
}
-
YamlPersistRepositoryConfigurationSwapper<PersistRepositoryConfiguration>
swapper = TypedSPILoader.getService(
- YamlPersistRepositoryConfigurationSwapper.class,
yamlConfig.getType());
+
YamlPersistRepositoryConfigurationSwapper<PersistRepositoryConfiguration>
swapper =
TypedSPILoader.getService(YamlPersistRepositoryConfigurationSwapper.class,
yamlConfig.getType());
return new ModeConfiguration(yamlConfig.getType(),
swapper.swapToObject(yamlConfig.getRepository()));
}
}