Re: ClassCastException in getShort(int)

From: Kris Jurka <books(at)ejurka(dot)com>
To: Christian Niles <christian(at)unit12(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: ClassCastException in getShort(int)
Date: 2004-10-21 19:15:45
Message-ID: Pine.BSO.4.56.0410211414070.8130@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Christian Niles 2004-10-21 19:53:14 Re: Calling functions with smallint fails
Previous Message Kris Jurka 2004-10-21 18:59:54 Re: Calling functions with smallint fails