Skip to content

Commit

Permalink
Refactor ReadwriteSplittingDataSourceMapperRuleAttribute (#33541)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Nov 4, 2024
1 parent 894f236 commit 611d5e2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.shardingsphere.readwritesplitting.rule.ReadwriteSplittingDataSourceGroupRule;

import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
Expand All @@ -37,7 +37,7 @@ public final class ReadwriteSplittingDataSourceMapperRuleAttribute implements Da
@HighFrequencyInvocation
@Override
public Map<String, Collection<String>> getDataSourceMapper() {
Map<String, Collection<String>> result = new HashMap<>(dataSourceGroupRules.size(), 1F);
Map<String, Collection<String>> result = new LinkedHashMap<>(dataSourceGroupRules.size(), 1F);
for (ReadwriteSplittingDataSourceGroupRule each : dataSourceGroupRules) {
result.put(each.getName(), each.getReadwriteSplittingGroup().getAllDataSources());
}
Expand Down

0 comments on commit 611d5e2

Please sign in to comment.