diff --git a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/api/yaml/YamlShardingSphereDataSourceFactory.java b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/api/yaml/YamlShardingSphereDataSourceFactory.java index a89aa183ddb64..7da615d2c0329 100644 --- a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/api/yaml/YamlShardingSphereDataSourceFactory.java +++ b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/api/yaml/YamlShardingSphereDataSourceFactory.java @@ -47,7 +47,7 @@ @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class YamlShardingSphereDataSourceFactory { - private static final YamlRuleConfigurationSwapperEngine SWAPPER_ENGINE = new YamlRuleConfigurationSwapperEngine(); + private static final YamlRuleConfigurationSwapperEngine RULE_CONFIG_SWAPPER = new YamlRuleConfigurationSwapperEngine(); private static final YamlDataSourceConfigurationSwapper DATA_SOURCE_SWAPPER = new YamlDataSourceConfigurationSwapper(); @@ -72,7 +72,7 @@ public static DataSource createDataSourceWithoutCache(final YamlRootConfiguratio private static DataSource createDataSource(final Map dataSourceMap, final YamlRootConfiguration rootConfig) throws SQLException { ModeConfiguration modeConfig = null == rootConfig.getMode() ? null : new YamlModeConfigurationSwapper().swapToObject(rootConfig.getMode()); - Collection ruleConfigs = SWAPPER_ENGINE.swapToRuleConfigurations(rootConfig.getRules()); + Collection ruleConfigs = RULE_CONFIG_SWAPPER.swapToRuleConfigurations(rootConfig.getRules()); return ShardingSphereDataSourceFactory.createDataSource(rootConfig.getDatabaseName(), modeConfig, dataSourceMap, ruleConfigs, rootConfig.getProps()); } @@ -163,7 +163,7 @@ private static DataSource createDataSource(final DataSource dataSource, final Ya private static DataSource createDataSource(final Map dataSourceMap, final YamlJDBCConfiguration jdbcConfig) throws SQLException { rebuildGlobalRuleConfiguration(jdbcConfig); ModeConfiguration modeConfig = null == jdbcConfig.getMode() ? null : new YamlModeConfigurationSwapper().swapToObject(jdbcConfig.getMode()); - Collection ruleConfigs = SWAPPER_ENGINE.swapToRuleConfigurations(jdbcConfig.getRules()); + Collection ruleConfigs = RULE_CONFIG_SWAPPER.swapToRuleConfigurations(jdbcConfig.getRules()); return ShardingSphereDataSourceFactory.createDataSource(jdbcConfig.getDatabaseName(), modeConfig, dataSourceMap, ruleConfigs, jdbcConfig.getProps()); }