提交 0208dd2b 编写于 作者: S serge-rider

NULL arrays support fix


Former-commit-id: b6d9387f
上级 0b137466
......@@ -56,10 +56,13 @@ public class JDBCCollection implements DBDCollection, DBDValueCloneable {
private static final Log log = Log.getLog(JDBCCollection.class);
private Object[] contents;
private final DBSDataType type;
private final DBDValueHandler valueHandler;
private DBSDataType type;
private DBDValueHandler valueHandler;
private boolean modified;
public JDBCCollection() {
}
public JDBCCollection(DBSDataType type, DBDValueHandler valueHandler, @Nullable Object[] contents) {
this.type = type;
this.valueHandler = valueHandler;
......@@ -157,6 +160,9 @@ public class JDBCCollection implements DBDCollection, DBDValueCloneable {
}
public Array getArrayValue() throws DBCException {
if (contents == null) {
return null;
}
Object[] attrs = new Object[contents.length];
for (int i = 0; i < contents.length; i++) {
Object attr = contents[i];
......@@ -210,7 +216,7 @@ public class JDBCCollection implements DBDCollection, DBDValueCloneable {
try {
if (elementType == null) {
if (array == null) {
return null;
return new JDBCCollection();
}
try {
return makeCollectionFromResultSet(session, array, null);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册