Polish "Remove boxing"

See gh-18552
pull/18564/head
Stephane Nicoll 5 years ago
parent fe6da39e1b
commit 40bd98a3f4

@ -56,7 +56,7 @@ abstract class AbstractDataSourcePoolMetadataTests<D extends AbstractDataSourceP
JdbcTemplate jdbcTemplate = new JdbcTemplate(getDataSourceMetadata().getDataSource());
jdbcTemplate.execute((ConnectionCallback<Void>) (connection) -> null);
assertThat(getDataSourceMetadata().getActive()).isEqualTo(0);
assertThat(getDataSourceMetadata().getUsage()).isEqualTo((float) 0);
assertThat(getDataSourceMetadata().getUsage()).isEqualTo(0f);
}
@Test
@ -64,7 +64,7 @@ abstract class AbstractDataSourcePoolMetadataTests<D extends AbstractDataSourceP
JdbcTemplate jdbcTemplate = new JdbcTemplate(getDataSourceMetadata().getDataSource());
jdbcTemplate.execute((ConnectionCallback<Void>) (connection) -> {
assertThat(getDataSourceMetadata().getActive()).isEqualTo(1);
assertThat(getDataSourceMetadata().getUsage()).isEqualTo(0.5F);
assertThat(getDataSourceMetadata().getUsage()).isEqualTo(0.5f);
return null;
});
}

@ -61,7 +61,7 @@ class CommonsDbcp2DataSourcePoolMetadataTests
@Test
void getPoolUsageWithUnlimitedPool() {
DataSourcePoolMetadata unlimitedDataSource = createDataSourceMetadata(0, -1);
assertThat(unlimitedDataSource.getUsage()).isEqualTo(-1F);
assertThat(unlimitedDataSource.getUsage()).isEqualTo(-1f);
}
@Override

Loading…
Cancel
Save