From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | Fischer Krisztián <fischer(at)borganization(dot)com> |
Cc: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: ResultSet.previous() - ArrayIndexOutOfBoundsException |
Date: | 2004-01-19 17:35:59 |
Message-ID: | Pine.LNX.4.33.0401191232280.32357-200000@leary.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Mon, 19 Jan 2004, [ISO-8859-2] Fischer Krisztin wrote:
> Hi!
>
> I use PostgreSQL 7.4.1 through the shipped JDBC driver. In some
> circumstances the driver throws the following exception:
>
> [...]
> java.lang.ArrayIndexOutOfBoundsException: 1 >= 0
> at java.util.Vector.elementAt(Vector.java:431)
> at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.previous(AbstractJdbc2ResultSet.java:495)
> at
> com.bh.server.implementation.SQLObject.previousRow(SQLObject.java:583)
Here's a sample program to demonstrate the problem. Basically it assumes
that rs.next() won't be called after it returns false. The same problem
is also true in reverse, calling previous and then next will show the same
issue. I should hopefully have a patch for this later today.
Kris Jurka
Attachment | Content-Type | Size |
---|---|---|
PreviousTest.java | text/plain | 532 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2004-01-19 17:41:49 | Re: clarification needed in postgresql... + transactions... |
Previous Message | Alessandro Depase | 2004-01-19 15:53:27 | Re: clarification needed in postgresql... + transactions... |