From ed6f11d60de998f85687fa90a736b695771cf1a7 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 10 Jun 2016 11:46:26 -0700 Subject: [PATCH] Polish --- .../boot/autoconfigure/jdbc/DataSourceBuilder.java | 6 ++---- .../AbstractDevToolsDataSourceAutoConfigurationTests.java | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) 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());