--- a/src/Pure/General/sql.scala Wed May 03 23:04:25 2017 +0200
+++ b/src/Pure/General/sql.scala Wed May 03 23:21:08 2017 +0200
@@ -428,7 +428,10 @@
else stmt.setObject(i, OffsetDateTime.from(date.to_utc.rep))
def date(rs: ResultSet, column: SQL.Column): Date =
- Date.instant(rs.getObject(column.name, classOf[OffsetDateTime]).toInstant)
+ {
+ val obj = rs.getObject(column.name, classOf[OffsetDateTime])
+ if (obj == null) null else Date.instant(obj.toInstant)
+ }
def insert_permissive(table: SQL.Table, sql: String = ""): String =
table.insert_cmd("INSERT",