提交 4c08066f 编写于 作者: T terrymanu

refactor RoutingResultValidator's constructor

上级 7740d44b
......@@ -48,6 +48,7 @@ import java.util.LinkedList;
* Routing result validator.
*
* @author sunbufu
* @author zhangliang
*/
public final class RoutingResultValidator {
......@@ -69,12 +70,8 @@ public final class RoutingResultValidator {
this.metaData = metaData;
this.shardingStatement = shardingStatement;
this.shardingConditions = shardingConditions;
if (shardingRule.getRuleConfiguration().getMasterSlaveRuleConfigs().isEmpty()) {
checkDataSource = true;
}
if (shardingStatement.getSQLStatement() instanceof DMLStatement) {
checkTable = true;
}
checkDataSource = shardingRule.getRuleConfiguration().getMasterSlaveRuleConfigs().isEmpty();
checkTable = shardingStatement.getSQLStatement() instanceof DMLStatement;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册