Re: ClassCastException in getShort(int) - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: ClassCastException in getShort(int)
Date
Msg-id Pine.BSO.4.56.0410211414070.8130@leary.csoft.net
Whole thread Raw
In response to ClassCastException in getShort(int)  (Christian Niles <christian@unit12.net>)
List 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

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Calling functions with smallint fails
Next
From: Christian Niles
Date:
Subject: Re: Calling functions with smallint fails