According to ResultSet.getObject() javadoc:
The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification.
We currently return our default type, e.g. in case of DATE we return LocalDate, not java.sql.Date. We must return the correct type.