diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBuilder.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBuilder.java index d6a48e7f79..1e6b1ea67e 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBuilder.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBuilder.java @@ -83,10 +83,8 @@ public class DataSourceBuilder { private void bind(DataSource result) { MutablePropertyValues properties = new MutablePropertyValues(this.properties); - new RelaxedDataBinder(result) - .withAlias("url", "jdbcUrl") - .withAlias("username", "user") - .bind(properties); + new RelaxedDataBinder(result).withAlias("url", "jdbcUrl") + .withAlias("username", "user").bind(properties); } public DataSourceBuilder type(Class type) { diff --git a/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/AbstractDevToolsDataSourceAutoConfigurationTests.java b/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/AbstractDevToolsDataSourceAutoConfigurationTests.java index 0d7a29c454..a32d074798 100644 --- a/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/AbstractDevToolsDataSourceAutoConfigurationTests.java +++ b/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/AbstractDevToolsDataSourceAutoConfigurationTests.java @@ -76,7 +76,6 @@ public class AbstractDevToolsDataSourceAutoConfigurationTests { @Test public void emptyFactoryMethodMetadataIgnored() { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); - DataSource dataSource = mock(DataSource.class); AnnotatedGenericBeanDefinition beanDefinition = new AnnotatedGenericBeanDefinition( dataSource.getClass());