Candidate fix for issue - problem reading sql result sets
@@ -143,15 +143,15 @@ long, Long: -9223372036854775808 9223372036854775807 NUMBER(18)
for (int i = 1; i <= metaData.getColumnCount(); i++) {
Column<?> column = table.column(i - 1); // subtract 1 because results sets originate at 1 not 0
if (column instanceof ShortColumn) {
- column.appendObj(resultSet.getObject(i, Short.class));
+ column.appendObj(resultSet.getShort(i));
} else if (column instanceof IntColumn) {
- column.appendObj(resultSet.getObject(i, Integer.class));
+ column.appendObj(resultSet.getInt(i));
} else if (column instanceof LongColumn) {
- column.appendObj(resultSet.getObject(i, Long.class));
+ column.appendObj(resultSet.getLong(i));
} else if (column instanceof FloatColumn) {
- column.appendObj(resultSet.getObject(i, Float.class));
+ column.appendObj(resultSet.getFloat(i));
} else if (column instanceof DoubleColumn) {
- column.appendObj(resultSet.getObject(i, Double.class));
+ column.appendObj(resultSet.getDouble(i));
} else {
column.appendObj(resultSet.getObject(i));
}
