From: Barry Lind Date: Fri, 7 Jun 2002 16:46:24 +0000 (+0000) Subject: fixed bug reported by cc.ais40@wanadoo.fr where getObject was returning an Integer... X-Git-Tag: REL7_3~1446 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=936ff276966bf43c6dda24c01850e93024849639;p=thirdparty%2Fpostgresql.git fixed bug reported by cc.ais40@wanadoo.fr where getObject was returning an Integer for a smallint datatype instead of a Short --- diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java index 84a7dc3f9fa..a7d0389d560 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 20c68016ca8..6c6a821e6e1 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: