From 80c315702d8513b7d25728b744bff7d4abc5ea0b Mon Sep 17 00:00:00 2001 From: naftalmm Date: Tue, 8 Feb 2022 01:56:53 +0300 Subject: [PATCH] fallback to default implementation of `IColumnType.readObject` method only if `columnType` is unknown (not if its actual implementation of this method returned `null`) --- .../src/main/kotlin/org/jetbrains/exposed/sql/ResultRow.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/ResultRow.kt b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/ResultRow.kt index 18ec52928f..7f212594b7 100644 --- a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/ResultRow.kt +++ b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/ResultRow.kt @@ -88,7 +88,8 @@ class ResultRow( fun create(rs: ResultSet, fieldsIndex: Map, Int>): ResultRow { return ResultRow(fieldsIndex).apply { fieldsIndex.forEach { (field, index) -> - val value = (field as? Column<*>)?.columnType?.readObject(rs, index + 1) ?: rs.getObject(index + 1) + val columnType = (field as? Column<*>)?.columnType + val value = if (columnType != null) columnType.readObject(rs, index + 1) else rs.getObject(index + 1) data[index] = value } }