Skip to content

Commit cbeff50

Browse files
committed
Better nullability specs
1 parent c62a156 commit cbeff50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin/spring/NamedParameterJdbcTemplateExtensions.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ fun <T> NamedParameterJdbcTemplate.selectList(
202202
): List<T> =
203203
query(selectStatement.selectStatement, selectStatement.parameters, rowMapper)
204204

205-
fun <T> NamedParameterJdbcTemplate.selectList(
205+
fun <T : Any> NamedParameterJdbcTemplate.selectList(
206206
selectStatement: SelectStatementProvider,
207-
type: KClass<T & Any>
207+
type: KClass<T>
208208
): List<T> =
209209
queryForList(selectStatement.selectStatement, selectStatement.parameters, type.java)
210210

@@ -239,9 +239,9 @@ fun <T> NamedParameterJdbcTemplate.selectOne(
239239
}
240240

241241
@SuppressWarnings("SwallowedException")
242-
fun <T> NamedParameterJdbcTemplate.selectOne(
242+
fun <T : Any> NamedParameterJdbcTemplate.selectOne(
243243
selectStatement: SelectStatementProvider,
244-
type: KClass<T & Any>
244+
type: KClass<T>
245245
): T? = try {
246246
queryForObject(selectStatement.selectStatement, selectStatement.parameters, type.java)
247247
} catch (e: EmptyResultDataAccessException) {

0 commit comments

Comments
 (0)