Re: Improper type conversion from smallint to short - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Improper type conversion from smallint to short
Date
Msg-id alpine.BSO.2.00.1303142127130.9313@leary.csoft.net
Whole thread Raw
In response to Re: Improper type conversion from smallint to short  (Igor Urisman <igor.urisman@gmail.com>)
List 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

pgsql-jdbc by date:

Previous
From: Igor Urisman
Date:
Subject: Re: Improper type conversion from smallint to short
Next
From: Kevin Wooten
Date:
Subject: Re: A new JDBC driver...