Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit961eb57

Browse files
author
Peter Mount
committed
Fixed minor bug in ResultSet for jdbc2 reported by Matthew Denner that absolute doesnt handle negative row numbers correctly.
1 parent6d7f1d3 commit961eb57

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,14 +839,14 @@ public boolean absolute(int index) throws SQLException
839839

840840
//if index<0, count from the end of the result set, but check
841841
//to be sure that it is not beyond the first index
842-
if (index<0)
842+
if (index<0){
843843
if (index>=-rows.size())
844844
internalIndex=rows.size()+index;
845845
else {
846846
beforeFirst();
847847
returnfalse;
848848
}
849-
849+
}else {
850850
//must be the case that index>0,
851851
//find the correct place, assuming that
852852
//the index is not too large
@@ -856,6 +856,7 @@ public boolean absolute(int index) throws SQLException
856856
afterLast();
857857
returnfalse;
858858
}
859+
}
859860

860861
current_row=internalIndex;
861862
this_row = (byte [][])rows.elementAt(internalIndex);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp