Re: Improper type conversion from smallint to short

From: Igor Urisman <igor(dot)urisman(at)gmail(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Improper type conversion from smallint to short
Date: 2013-03-15 01:17:14
Message-ID: CAJ9OwnXAj=R-5HAFRXahwFeniCQLCSzUgbMHoGxfJUAT25Hq1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Thanks, Kris. Not to argue... The spec you're quoting from is pre Java
1.1, which is when Short was introduced. (Integer was in 1.0). Just
thinking... That same spec recommends primitive short. Just sayin'.
-Igor.

On Thu, Mar 14, 2013 at 5:27 PM, Kris Jurka <books(at)ejurka(dot)com> wrote:

>
>
> On Thu, 14 Mar 2013, Igor Urisman wrote:
>
> > Hello,It appears that ResultSet.getObject(String name) returns Integer
> for
> > database type Types.SMALLINT (5) I expected Short.
> >
>
> Returning Integer is correct according to the JDBC spec. See table 8.6.3
> here:
>
>
> http://www.cis.upenn.edu/~bcpierce/courses/629/jdkdocs/guide/jdbc/getstart/mapping.doc.html
>
> Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2013-03-15 02:29:46 Re: Improper type conversion from smallint to short
Previous Message Kris Jurka 2013-03-15 00:27:02 Re: Improper type conversion from smallint to short