From db559393da81200e79e7314a3ff91fd2dd223395 Mon Sep 17 00:00:00 2001 From: Liang Zhang Date: Thu, 22 Feb 2024 22:18:51 +0800 Subject: [PATCH] Refactor YamlBroadcastRuleConfigurationSwapper (#30247) --- .../yaml/swapper/YamlBroadcastRuleConfigurationSwapper.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/YamlBroadcastRuleConfigurationSwapper.java b/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/YamlBroadcastRuleConfigurationSwapper.java index c0993be8fab74..1e8f623191920 100644 --- a/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/YamlBroadcastRuleConfigurationSwapper.java +++ b/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/YamlBroadcastRuleConfigurationSwapper.java @@ -22,9 +22,6 @@ import org.apache.shardingsphere.broadcast.yaml.config.YamlBroadcastRuleConfiguration; import org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlRuleConfigurationSwapper; -import java.util.Collection; -import java.util.LinkedList; - /** * YAML broadcast rule configuration swapper. */ @@ -39,8 +36,7 @@ public YamlBroadcastRuleConfiguration swapToYamlConfiguration(final BroadcastRul @Override public BroadcastRuleConfiguration swapToObject(final YamlBroadcastRuleConfiguration yamlConfig) { - Collection tables = new LinkedList<>(yamlConfig.getTables()); - return new BroadcastRuleConfiguration(tables); + return new BroadcastRuleConfiguration(yamlConfig.getTables()); } @Override