Polish formatting

This commit is contained in:
Phillip Webb
2016-12-19 12:37:54 -08:00
parent 4b9cba351b
commit 6121208cbb
46 changed files with 110 additions and 88 deletions

View File

@@ -30,7 +30,6 @@ public enum SearchStrategy {
/**
* Search all parents and ancestors, but not the current context.
*
* @deprecated since 1.5 in favor of {@link SearchStrategy#ANCESTORS}
*/
@Deprecated PARENTS,

View File

@@ -84,6 +84,7 @@ abstract class DataSourceConfiguration {
/**
* DBCP DataSource configuration.
*
* @deprecated as of Spring Boot 1.5 in favor of DBCP2
*/
@ConditionalOnClass(org.apache.commons.dbcp.BasicDataSource.class)

View File

@@ -124,8 +124,8 @@ class DataSourceInitializer implements ApplicationListener<DataSourceInitialized
runScripts(scripts, username, password);
}
private List<Resource> getScripts(String propertyName,
List<String> resources, String fallback) {
private List<Resource> getScripts(String propertyName, List<String> resources,
String fallback) {
if (resources != null) {
return getResources(propertyName, resources, true);
}
@@ -136,8 +136,8 @@ class DataSourceInitializer implements ApplicationListener<DataSourceInitialized
return getResources(propertyName, fallbackResources, false);
}
private List<Resource> getResources(String propertyName,
List<String> locations, boolean validate) {
private List<Resource> getResources(String propertyName, List<String> locations,
boolean validate) {
List<Resource> resources = new ArrayList<Resource>();
for (String location : locations) {
for (Resource resource : doGetResources(location)) {

View File

@@ -130,6 +130,7 @@ public class JmsProperties {
? this.concurrency + "-" + this.maxConcurrency
: String.valueOf(this.concurrency));
}
}
public static class Template {

View File

@@ -30,8 +30,8 @@ import org.springframework.jdbc.support.SQLExceptionTranslator;
import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator;
/**
* Transforms {@link java.sql.SQLException} into a Spring-specific {@link
* DataAccessException}.
* Transforms {@link java.sql.SQLException} into a Spring-specific
* {@link DataAccessException}.
*
* @author Lukas Eder
* @author Andreas Ahlenstorf

View File

@@ -56,7 +56,8 @@ public class ValidationAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public MethodValidationPostProcessor methodValidationPostProcessor(Validator validator) {
public MethodValidationPostProcessor methodValidationPostProcessor(
Validator validator) {
MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
processor.setValidator(validator);
return processor;

View File

@@ -1554,6 +1554,7 @@ public class ServerProperties
public void setRotate(boolean rotate) {
this.rotate = rotate;
}
}
}

View File

@@ -297,9 +297,8 @@ public class DataSourceInitializerTests {
PropertyPlaceholderAutoConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:true",
"spring.datasource.schema:"
+ ClassUtils.addResourcePathToPackagePath(getClass(),
"schema.sql"),
"spring.datasource.schema:" + ClassUtils
.addResourcePathToPackagePath(getClass(), "schema.sql"),
"spring.datasource.data:classpath:does/not/exist.sql");
this.thrown.expect(BeanCreationException.class);

View File

@@ -67,14 +67,15 @@ public class ValidationAutoConfigurationTests {
public void userDefinedMethodValidationPostProcessorTakesPrecedence() {
load(SampleConfiguration.class);
assertThat(this.context.getBeansOfType(Validator.class)).hasSize(1);
Object userMethodValidationPostProcessor =
this.context.getBean("testMethodValidationPostProcessor");
Object userMethodValidationPostProcessor = this.context
.getBean("testMethodValidationPostProcessor");
assertThat(this.context.getBean(MethodValidationPostProcessor.class))
.isSameAs(userMethodValidationPostProcessor);
assertThat(this.context.getBeansOfType(MethodValidationPostProcessor.class))
.hasSize(1);
assertThat(this.context.getBean(Validator.class)).isNotSameAs(
new DirectFieldAccessor(userMethodValidationPostProcessor).getPropertyValue("validator"));
assertThat(this.context.getBean(Validator.class))
.isNotSameAs(new DirectFieldAccessor(userMethodValidationPostProcessor)
.getPropertyValue("validator"));
}
public void load(Class<?> config) {