diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/AbstractDataSourcePoolMetadataTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/AbstractDataSourcePoolMetadataTests.java index c8023ad258..61ff661ab8 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/AbstractDataSourcePoolMetadataTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/AbstractDataSourcePoolMetadataTests.java @@ -42,12 +42,12 @@ abstract class AbstractDataSourcePoolMetadataTests) (connection) -> null); - assertThat(getDataSourceMetadata().getActive()).isEqualTo(Integer.valueOf(0)); - assertThat(getDataSourceMetadata().getUsage()).isEqualTo(Float.valueOf(0)); + assertThat(getDataSourceMetadata().getActive()).isEqualTo(0); + assertThat(getDataSourceMetadata().getUsage()).isEqualTo((float) 0); } @Test void getPoolSizeOneConnection() { JdbcTemplate jdbcTemplate = new JdbcTemplate(getDataSourceMetadata().getDataSource()); jdbcTemplate.execute((ConnectionCallback) (connection) -> { - assertThat(getDataSourceMetadata().getActive()).isEqualTo(Integer.valueOf(1)); - assertThat(getDataSourceMetadata().getUsage()).isEqualTo(Float.valueOf(0.5F)); + assertThat(getDataSourceMetadata().getActive()).isEqualTo(1); + assertThat(getDataSourceMetadata().getUsage()).isEqualTo(0.5F); return null; }); } @@ -73,7 +73,7 @@ abstract class AbstractDataSourcePoolMetadataTests) (connection) -> null); - assertThat(getDataSourceMetadata().getIdle()).isEqualTo(Integer.valueOf(1)); + assertThat(getDataSourceMetadata().getIdle()).isEqualTo(1); } @Test diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/CommonsDbcp2DataSourcePoolMetadataTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/CommonsDbcp2DataSourcePoolMetadataTests.java index 2207eb82a6..d2a175774c 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/CommonsDbcp2DataSourcePoolMetadataTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/CommonsDbcp2DataSourcePoolMetadataTests.java @@ -61,7 +61,7 @@ class CommonsDbcp2DataSourcePoolMetadataTests @Test void getPoolUsageWithUnlimitedPool() { DataSourcePoolMetadata unlimitedDataSource = createDataSourceMetadata(0, -1); - assertThat(unlimitedDataSource.getUsage()).isEqualTo(Float.valueOf(-1F)); + assertThat(unlimitedDataSource.getUsage()).isEqualTo(-1F); } @Override