aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarry Lind <barry@xythos.com>2002-06-07 16:46:24 +0000
committerBarry Lind <barry@xythos.com>2002-06-07 16:46:24 +0000
commit936ff276966bf43c6dda24c01850e93024849639 (patch)
tree79af9aa27442b2f8bd0ba86ba39c9e359c382a15 /src
parentc78e411fef9401dfb3cd6e9170b5864f3b195601 (diff)
downloadpostgresql-936ff276966bf43c6dda24c01850e93024849639.tar.gz
postgresql-936ff276966bf43c6dda24c01850e93024849639.zip
fixed bug reported by cc.ais40@wanadoo.fr where getObject was returning an Integer for a smallint datatype instead of a Short
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java2
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java2
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 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: