well, it works but is it possible to fix this ``` ...
# announcements
r
well, it works but is it possible to fix this
Copy code
inline fun <reified T : Any?> NamedParameterJdbcTemplate.queryForObject(sql: String, parameters: Map<String, *>): T {
    if (null is T) {
        return try {
            this.queryForObject(sql, parameters, T::class.java) as T
        } catch (ex: EmptyResultDataAccessException) {
            return null
        }
    } else {
        return this.queryForObject(sql, parameters, T::class.java) as T
    }
}
so
return null
is not possible, but if we call
queryForObject<Long?>
it should allow
null