提交 fbea9e93 authored 作者: Noel Grandin's avatar Noel Grandin

fix bug in SimpleResultSet::beforeFirst()

needs to throw a SQLException not a DbException
上级 304b68b2
...@@ -30,7 +30,6 @@ import java.util.ArrayList; ...@@ -30,7 +30,6 @@ import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import org.h2.api.ErrorCode; import org.h2.api.ErrorCode;
import org.h2.jdbc.JdbcResultSetBackwardsCompat; import org.h2.jdbc.JdbcResultSetBackwardsCompat;
import org.h2.message.DbException; import org.h2.message.DbException;
...@@ -243,7 +242,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData, ...@@ -243,7 +242,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData,
@Override @Override
public void beforeFirst() throws SQLException { public void beforeFirst() throws SQLException {
if (autoClose) { if (autoClose) {
throw DbException.get(ErrorCode.RESULT_SET_NOT_SCROLLABLE); throw DbException.get(ErrorCode.RESULT_SET_NOT_SCROLLABLE).getSQLException();
} }
rowId = -1; rowId = -1;
if (source != null) { if (source != null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论