Deprecate superseded Object[] signatures in JdbcOperations/JdbcTemplate

Closes gh-25272
This commit is contained in:
Juergen Hoeller
2020-06-18 17:47:27 +02:00
parent 1c75f95be0
commit 2d5f9723fa
5 changed files with 27 additions and 9 deletions

View File

@@ -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.
@@ -69,9 +69,9 @@ class JdbcOperationsExtensionsTests {
@Test
fun `queryForObject with reified type parameters and args`() {
val args = arrayOf(3)
every { template.queryForObject(sql, args, any<Class<Int>>()) } returns 2
every { template.queryForObject(sql, any<Class<Int>>(), args) } returns 2
assertThat(template.queryForObject<Int>(sql, args)).isEqualTo(2)
verify { template.queryForObject(sql, args, any<Class<Int>>()) }
verify { template.queryForObject(sql, any<Class<Int>>(), args) }
}
@Test
@@ -96,9 +96,9 @@ class JdbcOperationsExtensionsTests {
fun `queryForList with reified type parameters and args`() {
val list = listOf(1, 2, 3)
val args = arrayOf(3)
every { template.queryForList(sql, args, any<Class<Int>>()) } returns list
every { template.queryForList(sql, any<Class<Int>>(), args) } returns list
template.queryForList<Int>(sql, args)
verify { template.queryForList(sql, args, any<Class<Int>>()) }
verify { template.queryForList(sql, any<Class<Int>>(), args) }
}
@Test