Upgrade to Kotlin 1.4 M2
- The compiler is configured to retain compatibility with Kotlin 1.3. - Explicit API mode is not yet enabled but could be in the future. - A workaround for Gradle build is required for now, see https://youtrack.jetbrains.com/issue/KT-39610 for more details. - Some exceptions thrown by Kotlin have changed to NullPointerException, see https://youtrack.jetbrains.com/issue/KT-22275 for more details. Closes gh-24171
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors
|
||||
* Copyright 2002-2020 the original author or authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -53,7 +53,7 @@ class JdbcOperationsExtensionsTests {
|
||||
@Test // gh-22682
|
||||
fun `queryForObject with nullable RowMapper-like function`() {
|
||||
every { template.queryForObject(sql, any<RowMapper<Int>>(), 3) } returns null
|
||||
assertThat(template.queryForObject(sql, 3) { _, _ -> null as Int? }).isNull()
|
||||
assertThat(template.queryForObject<Int?>(sql, 3) { _, _ -> null }).isNull()
|
||||
verify { template.queryForObject(eq(sql), any<RowMapper<Int?>>(), eq(3)) }
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ class JdbcOperationsExtensionsTests {
|
||||
|
||||
@Test
|
||||
fun `query with RowMapper-like function`() {
|
||||
val list = listOf(1, 2, 3)
|
||||
val list = mutableListOf(1, 2, 3)
|
||||
every { template.query(sql, ofType<RowMapper<*>>(), 3) } returns list
|
||||
assertThat(template.query(sql, 3) { rs, _ ->
|
||||
rs.getInt(1)
|
||||
|
||||
Reference in New Issue
Block a user