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.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=936ff276966bf43c6dda24c01850e93024849639;p=users%2Fhanada%2Fpostgres.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 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: