From 9cd64719a31427811ab66dcb93b04684a02e6d77 Mon Sep 17 00:00:00 2001 From: Serge Rider Date: Thu, 22 Oct 2020 11:02:27 +0300 Subject: [PATCH] Column type change fix (NPE) Former-commit-id: a61c38401793627ae9af445ee2d33714087e5652 --- .../model/impl/jdbc/struct/JDBCTableColumn.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/struct/JDBCTableColumn.java b/plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/struct/JDBCTableColumn.java index db938a478d..738f2b995a 100644 --- a/plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/struct/JDBCTableColumn.java +++ b/plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/struct/JDBCTableColumn.java @@ -124,16 +124,16 @@ public abstract class JDBCTableColumn extends JDBC DBSDataType dataType = ((DBPDataTypeProvider) dataSource).getLocalDataType(typeName); if (dataType != null) { this.valueType = dataType.getTypeID(); + if (this instanceof DBSTypedObjectExt4) { + try { + ((DBSTypedObjectExt4) this).setDataType(dataType); + } catch (Throwable e) { + log.debug(e); + } + } } else { this.valueType = -1; } - if (this instanceof DBSTypedObjectExt4) { - try { - ((DBSTypedObjectExt4) this).setDataType(dataType); - } catch (Throwable e) { - log.debug(e); - } - } } } -- GitLab