From 4ab104f5afee57179b6fcfa45355653adebb0aa1 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 10 Oct 2023 16:27:53 -0700 Subject: [PATCH] Use type safe JdbcClient query Update `JdbcClientAutoConfigurationTests` to use a type safe query since Spring Framework now returns `Object` types when no type is specified (see Spring Framework issue 31403). See gh-37710 --- .../autoconfigure/jdbc/JdbcClientAutoConfigurationTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JdbcClientAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JdbcClientAutoConfigurationTests.java index 03222cfbeb..6c4035dc79 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JdbcClientAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JdbcClientAutoConfigurationTests.java @@ -94,7 +94,7 @@ class JdbcClientAutoConfigurationTests { private final Long count; JdbcClientDataSourceMigrationValidator(JdbcClient jdbcClient) { - this.count = jdbcClient.sql("SELECT COUNT(*) from CITY").query().singleValue(); + this.count = jdbcClient.sql("SELECT COUNT(*) from CITY").query(Long.class).single(); } }