From: Kris Jurka <books@ejurka.com>
To: Christian Niles <christian@unit12.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: ClassCastException in getShort(int)
Date: Thu, 21 Oct 2004 14:15:45 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0410211414070.8130@leary.csoft.net> (raw)
In-Reply-To: <B65963E7-238C-11D9-83CE-000A9590B78E@unit12.net>
References: <B65963E7-238C-11D9-83CE-000A9590B78E@unit12.net>
On Thu, 21 Oct 2004, Christian Niles wrote:
> I've found a bug in AbstractJdbc1Statement.getShort(int) which causes a
> ClassCastException.
>
> The bug seems to be that getShort(int) casts the Short to an Integer:
I've fixed this in both 7.4 and 8.0 trees. Thanks.
> All the other methods seem to cast the appropriate type, except
> getByte(int), which also casts to Integer (I haven't tested
> getByte(int) though).
The getByte case is a can't happen situation, and I've put in an Exception
if the code actually gets there.
Kris Jurka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, christian@unit12.net
Subject: Re: ClassCastException in getShort(int)
In-Reply-To: <Pine.BSO.4.56.0410211414070.8130@leary.csoft.net>
References: <B65963E7-238C-11D9-83CE-000A9590B78E@unit12.net> <Pine.BSO.4.56.0410211414070.8130@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox