I will try to add more details, in Kotlin I call a...
# announcements
r
I will try to add more details, in Kotlin I call a java method
Copy code
@Override
@Nullable
public <T> T queryForObject(String sql, Map<String, ?> paramMap, Class<T> requiredType) { ... }
so I have a warning when I call this method, and I want to make an extension function to wrap call to this method at the moment is like
Copy code
inline fun <T : Any> NamedParameterJdbcTemplate.queryForKObject(sql: String, parameters: Map<String, *>, clazz: T): T {
    return this.queryForObject(sql, parameters, clazz.javaClass) as T
}
the issue when I call
jdbcTemplate.queryForKObject(sql, parameters, String)
it return
String.Companion
not a
String