ResetSetRecordSet: handle java.sql.Array Types in normalizeValue method
Some jdbc drivers e.g. Oracle returns java.sql.Array objects for array types, not just Lists.
This commit also handles these cases, and extracts the primitive java arrays out of this jdbc holder class.
This closes
@@ -128,7 +128,7 @@ public class ResultSetRecordSet implements RecordSet, Closeable {
}
@SuppressWarnings("rawtypes")
- private Object normalizeValue(final Object value) {
+ private Object normalizeValue(final Object value) throws SQLException {
if (value == null) {
return null;
}
@@ -137,6 +137,10 @@ public class ResultSetRecordSet implements RecordSet, Closeable {
return ((List) value).toArray();
}
+ if (value instanceof Array) {
+ return ((Array) value).getArray();
+ }
+
return value;
}
