Fix violation reported by Checkstyle

pull/8796/merge
Andy Wilkinson 8 years ago
parent a6f8351dd6
commit 198093c6a8

@ -117,9 +117,9 @@ public class LiquibaseAutoConfiguration {
private SpringLiquibase createSpringLiquibase() { private SpringLiquibase createSpringLiquibase() {
SpringLiquibase liquibase; SpringLiquibase liquibase;
DataSource dataSource = getDataSource(); DataSource dataSourceToUse = getDataSource();
if (dataSource == null) { if (dataSourceToUse == null) {
dataSource = DataSourceBuilder.create().url(this.properties.getUrl()) dataSourceToUse = DataSourceBuilder.create().url(this.properties.getUrl())
.username(this.properties.getUser()) .username(this.properties.getUser())
.password(this.properties.getPassword()).build(); .password(this.properties.getPassword()).build();
liquibase = new DataSourceClosingSpringLiquibase(); liquibase = new DataSourceClosingSpringLiquibase();
@ -127,7 +127,7 @@ public class LiquibaseAutoConfiguration {
else { else {
liquibase = new SpringLiquibase(); liquibase = new SpringLiquibase();
} }
liquibase.setDataSource(dataSource); liquibase.setDataSource(dataSourceToUse);
return liquibase; return liquibase;
} }

Loading…
Cancel
Save