Re: Anoter JDBC Error

From: Kris Jurka <books(at)ejurka(dot)com>
To: Aaron Mulder <ammulder(at)alumni(dot)princeton(dot)edu>
Cc: PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Anoter JDBC Error
Date: 2002-10-11 23:11:17
Message-ID: Pine.LNX.4.33.0210111908300.2952-200000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc pgsql-patches


This is doing a getInt on a field with a value of the empty string. The
application will still get an error after this patch, but it will be more
obvious where the error is coming from.

This patch also fixes a problem when retrieving negative monetary values.

On Wed, 9 Oct 2002, Aaron Mulder wrote:

> Haven't had a chance to look into this one yet -- came up in
> DBVis, while looking for the columns for a new table, so it's probably
> another DBMD query. Something assuming a String won't be empty?
>
> java.lang.StringIndexOutOfBoundsException: String index out of range: 0
> at java.lang.String.charAt(String.java:460)
> at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getFixedString(AbstractJdbc1ResultSet.java:650)
> at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getInt(AbstractJdbc1ResultSet.java:144)
>
> BTW, thanks for the ' fix.
>
> Aaron
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

Attachment Content-Type Size
getFixedString.patch text/plain 1.0 KB

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nic Ferrier 2002-10-11 23:14:47 Re: Out of memory error on huge resultset
Previous Message snpe 2002-10-11 22:39:41 Re: Out of memory error on huge resultset

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-10-11 23:35:14 Re: inline newNode()
Previous Message Peter Eisentraut 2002-10-11 23:07:52 Re: INSTALL updates