Commit 198093c6 authored by Andy Wilkinson's avatar Andy Wilkinson

Fix violation reported by Checkstyle

parent a6f8351d
......@@ -117,9 +117,9 @@ public class LiquibaseAutoConfiguration {
private SpringLiquibase createSpringLiquibase() {
SpringLiquibase liquibase;
DataSource dataSource = getDataSource();
if (dataSource == null) {
dataSource = DataSourceBuilder.create().url(this.properties.getUrl())
DataSource dataSourceToUse = getDataSource();
if (dataSourceToUse == null) {
dataSourceToUse = DataSourceBuilder.create().url(this.properties.getUrl())
.username(this.properties.getUser())
.password(this.properties.getPassword()).build();
liquibase = new DataSourceClosingSpringLiquibase();
......@@ -127,7 +127,7 @@ public class LiquibaseAutoConfiguration {
else {
liquibase = new SpringLiquibase();
}
liquibase.setDataSource(dataSource);
liquibase.setDataSource(dataSourceToUse);
return liquibase;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment