See gh-42798
This commit is contained in:
Tran Ngoc Nhan
2024-10-19 20:03:02 +07:00
committed by Moritz Halbritter
parent b16b452131
commit fcbf6b0200
7 changed files with 8 additions and 8 deletions

View File

@@ -214,7 +214,7 @@ public class TestDatabaseAutoConfiguration {
List<ConfigurationProperty> bound = new ArrayList<>();
Binder.get(this.environment, new BoundPropertiesTrackingBindHandler(bound::add))
.bind(DATASOURCE_URL_PROPERTY, BINDABLE_STRING);
return (!bound.isEmpty()) ? isUsingTestDatasourceUrl(bound.get(0)) : false;
return !bound.isEmpty() && isUsingTestDatasourceUrl(bound.get(0));
}
private boolean isUsingTestDatasourceUrl(ConfigurationProperty configurationProperty) {