Re: Improper type conversion from smallint to short

From: Kris Jurka <books(at)ejurka(dot)com>
To: Igor Urisman <igor(dot)urisman(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Improper type conversion from smallint to short
Date: 2013-03-15 02:29:46
Message-ID: alpine.BSO.2.00.1303142127130.9313@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 14 Mar 2013, Igor Urisman wrote:

> 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.

That was just the first link I happened to find. The specs are in PDF
format that makes linking tough, but if you check the current spec you'll
see the same table, but with this note:

Note . The JDBC 1.0 specification defined the Java object mapping for the
SMALLINT and TINYINT JDBC types to be Integer. The Java language did not
include the Byte and Short data types when the JDBC 1.0 specification was
finalized. The mapping of SMALLINT and TINYINT to Integer is maintained to
preserve backwards compatibility.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kevin Wooten 2013-03-15 05:15:10 Re: A new JDBC driver...
Previous Message Igor Urisman 2013-03-15 01:17:14 Re: Improper type conversion from smallint to short