From 198093c6a84a23de7b6d086ee65829a8e5db6b14 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 15 May 2017 17:44:17 +0100 Subject: [PATCH] Fix violation reported by Checkstyle --- .../liquibase/LiquibaseAutoConfiguration.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration.java index 7570d9a47b..7257191b06 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration.java @@ -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; }