提交 cd0ef2bd 编写于 作者: Y Yanick.xia 提交者: Liang Zhang

make code readable (#3402)

上级 758dea85
......@@ -103,7 +103,7 @@ public final class EncryptInsertValuesTokenGenerator extends BaseEncryptSQLToken
private int getStartIndex(final Collection<InsertValuesSegment> segments) {
int result = segments.iterator().next().getStartIndex();
for (InsertValuesSegment each : segments) {
result = result > each.getStartIndex() ? each.getStartIndex() : result;
result = Math.min(result, each.getStartIndex());
}
return result;
}
......@@ -111,7 +111,7 @@ public final class EncryptInsertValuesTokenGenerator extends BaseEncryptSQLToken
private int getStopIndex(final Collection<InsertValuesSegment> segments) {
int result = segments.iterator().next().getStopIndex();
for (InsertValuesSegment each : segments) {
result = result < each.getStopIndex() ? each.getStopIndex() : result;
result = Math.max(result, each.getStopIndex());
}
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册