From 936ff276966bf43c6dda24c01850e93024849639 Mon Sep 17 00:00:00 2001 From: Barry Lind Date: Fri, 7 Jun 2002 16:46:24 +0000 Subject: [PATCH] fixed bug reported by cc.ais40@wanadoo.fr where getObject was returning an Integer for a smallint datatype instead of a Short --- src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java | 2 +- src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java index 84a7dc3f9f..a7d0389d56 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java @@ -929,7 +929,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu case Types.BIT: return new Boolean(getBoolean(columnIndex)); case Types.SMALLINT: - return new Integer(getInt(columnIndex)); + return new Short((short)getInt(columnIndex)); case Types.INTEGER: return new Integer(getInt(columnIndex)); case Types.BIGINT: diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java index 20c68016ca..6c6a821e6e 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java @@ -746,7 +746,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu case Types.BIT: return new Boolean(getBoolean(columnIndex)); case Types.SMALLINT: - return new Integer(getInt(columnIndex)); + return new Short((short)getInt(columnIndex)); case Types.INTEGER: return new Integer(getInt(columnIndex)); case Types.BIGINT: -- 2.40.0