Skip to content

Commit 024214f

Browse files
committed
Use SAM constructors for Kotlin extensions.
Closes #1111.
1 parent 30775b0 commit 024214f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-data-cassandra/src/main/kotlin/org/springframework/data/cassandra/core/cql/AsyncCqlOperationsExtensions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ inline fun <reified T : Any> AsyncCqlOperations.queryForObject(cql: String, vara
5858
* Extension for [AsyncCqlOperations.queryForObject] leveraging reified type parameters.
5959
*/
6060
fun <T : Any> AsyncCqlOperations.queryForObject(cql: String, vararg args: Any, function: (Row, Int) -> T): ListenableFuture<T?> =
61-
queryForObject(cql, function, *args)
61+
queryForObject(cql, RowMapper { row, i -> function(row, i) }, *args)
6262

6363
/**
6464
* Extension for [AsyncCqlOperations.queryForObject] providing a [KClass] based variant.
@@ -113,4 +113,4 @@ inline fun <reified T : Any> AsyncCqlOperations.query(cql: String, vararg args:
113113
* variant: `query("...", arg1, argN){ row, i -> }`.
114114
*/
115115
fun <T : Any> AsyncCqlOperations.query(cql: String, vararg args: Any, function: (Row, Int) -> T): ListenableFuture<List<T>> =
116-
query(cql, { row, i -> function(row, i) }, *args)
116+
query(cql, RowMapper { row, i -> function(row, i) }, *args)

0 commit comments

Comments
 (0)