1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

JNI wrapper1: when checking for an out-of-bounds statement column index, perform the is-statement-finalized check before the range check so that the former exception trumps the latter.

FossilOrigin-Name: 0832f9a8e9f574b157c791c5cddc73aff7b2ff403509f5d78f310494d4a7f93d
This commit is contained in:
stephan
2023-11-11 14:50:01 +00:00
parent 307f95c1e4
commit 56e1610f7a
3 changed files with 8 additions and 8 deletions

View File

@ -979,7 +979,7 @@ public final class Sqlite implements AutoCloseable {
/** Throws if n is out of range of this statement's result column
count. Intended to be used by the columnXyz() methods. */
private sqlite3_stmt checkColIndex(int n){
if(null==stmt || n<0 || n>=columnCount()){
if(n<0 || n>=columnCount()){
throw new IllegalArgumentException("Column index "+n+" is out of range.");
}
return thisStmt();