Re: Improper type conversion from smallint to short

Поиск
Список
Период
Сортировка
От Igor Urisman
Тема Re: Improper type conversion from smallint to short
Дата
Msg-id CAJ9OwnXAj=R-5HAFRXahwFeniCQLCSzUgbMHoGxfJUAT25Hq1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improper type conversion from smallint to short  (Kris Jurka <books@ejurka.com>)
Ответы Re: Improper type conversion from smallint to short  (Kris Jurka <books@ejurka.com>)
Список 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@ejurka.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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Improper type conversion from smallint to short
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Improper type conversion from smallint to short