提交 3a91dec0 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Fix after last state handling in SimpleResult

上级 d752711b
...@@ -77,7 +77,7 @@ public class SimpleResult implements ResultInterface { ...@@ -77,7 +77,7 @@ public class SimpleResult implements ResultInterface {
private final ArrayList<Value[]> rows; private final ArrayList<Value[]> rows;
private int rowId = -1; private int rowId;
/** /**
* Creates new instance of simple result. * Creates new instance of simple result.
...@@ -121,9 +121,9 @@ public class SimpleResult implements ResultInterface { ...@@ -121,9 +121,9 @@ public class SimpleResult implements ResultInterface {
@Override @Override
public boolean next() { public boolean next() {
if (rowId < rows.size() - 1) { int count = rows.size();
rowId++; if (rowId < count) {
return true; return ++rowId < count;
} }
return false; return false;
} }
...@@ -150,7 +150,7 @@ public class SimpleResult implements ResultInterface { ...@@ -150,7 +150,7 @@ public class SimpleResult implements ResultInterface {
@Override @Override
public boolean hasNext() { public boolean hasNext() {
return rowId < rows.size(); return rowId < rows.size() - 1;
} }
@Override @Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论