Integer is not a subclass of Short - Mailing list pgsql-jdbc

From Lloyd Parkes
Subject Integer is not a subclass of Short
Date
Msg-id 1280446120.8031.14.camel@cafe-de-la-rue.ecs.vuw.ac.nz
Whole thread Raw
Responses Re: Integer is not a subclass of Short
Re: Integer is not a subclass of Short
List pgsql-jdbc
Hi all,
I have found a problem with a discrepancy between getColumnClassName()
in jdbc/pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java
and internalGetObject() in
jdbc/pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java.

The former is defined (indirectly) to return the fully qualified class
name of (a possible superclass of) the object returned by the latter.
For a smallint column, the former returns "java.lang.Short", but the
latter returns a java.lang.Integer. Short is neither Integer, nor a
superclass of Integer.

I guess someone should add the line "return new
Short(getShort(columnIndex));" between lines 123 and 124 of rev 1.108 of
AbstractJdbc2ResultSet.java. There may be a similar problem with tinyint
columns, but I don't have any tinyint columns.

Cheers,
Lloyd


pgsql-jdbc by date:

Previous
From: David Kerr
Date:
Subject: Re: Idle in TX / Java process hang's in the vicinity of JDBC
Next
From: Kris Jurka
Date:
Subject: Re: Integer is not a subclass of Short