Format with Eclipse Oxygen SR2
This commit is contained in:
@@ -124,7 +124,7 @@ public class BatchAutoConfiguration {
|
||||
@ConditionalOnMissingBean(JobOperator.class)
|
||||
public SimpleJobOperator jobOperator(JobExplorer jobExplorer, JobLauncher jobLauncher,
|
||||
ListableJobLocator jobRegistry, JobRepository jobRepository)
|
||||
throws Exception {
|
||||
throws Exception {
|
||||
SimpleJobOperator factory = new SimpleJobOperator();
|
||||
factory.setJobExplorer(jobExplorer);
|
||||
factory.setJobLauncher(jobLauncher);
|
||||
|
||||
@@ -69,7 +69,8 @@ public enum CacheType {
|
||||
/**
|
||||
* Guava backed caching.
|
||||
*/
|
||||
@Deprecated GUAVA,
|
||||
@Deprecated
|
||||
GUAVA,
|
||||
|
||||
/**
|
||||
* Simple in-memory caching.
|
||||
|
||||
@@ -60,9 +60,8 @@ public class CouchbaseCacheConfiguration {
|
||||
public CouchbaseCacheManager cacheManager() {
|
||||
List<String> cacheNames = this.cacheProperties.getCacheNames();
|
||||
CouchbaseCacheManager cacheManager = new CouchbaseCacheManager(
|
||||
CacheBuilder.newInstance(this.bucket)
|
||||
.withExpiration(this.cacheProperties.getCouchbase()
|
||||
.getExpirationSeconds()),
|
||||
CacheBuilder.newInstance(this.bucket).withExpiration(
|
||||
this.cacheProperties.getCouchbase().getExpirationSeconds()),
|
||||
cacheNames.toArray(new String[cacheNames.size()]));
|
||||
return this.customizers.customize(cacheManager);
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ final class BeanTypeRegistry implements SmartInitializingSingleton {
|
||||
|
||||
private Class<?> doGetFactoryBeanGeneric(ConfigurableListableBeanFactory beanFactory,
|
||||
BeanDefinition definition, String name)
|
||||
throws Exception, ClassNotFoundException, LinkageError {
|
||||
throws Exception, ClassNotFoundException, LinkageError {
|
||||
if (StringUtils.hasLength(definition.getFactoryBeanName())
|
||||
&& StringUtils.hasLength(definition.getFactoryMethodName())) {
|
||||
return getConfigurationClassFactoryBeanGeneric(beanFactory, definition, name);
|
||||
|
||||
@@ -165,7 +165,7 @@ class OnBeanCondition extends SpringBootCondition implements ConfigurationCondit
|
||||
|
||||
private Collection<String> getBeanNamesForType(ListableBeanFactory beanFactory,
|
||||
String type, ClassLoader classLoader, boolean considerHierarchy)
|
||||
throws LinkageError {
|
||||
throws LinkageError {
|
||||
try {
|
||||
Set<String> result = new LinkedHashSet<String>();
|
||||
collectBeanNamesForType(result, beanFactory,
|
||||
|
||||
@@ -108,7 +108,7 @@ class OnPropertyCondition extends SpringBootCondition {
|
||||
ConditionMessage.forCondition(ConditionalOnProperty.class, spec)
|
||||
.found("different value in property",
|
||||
"different value in properties")
|
||||
.items(Style.QUOTE, nonMatchingProperties));
|
||||
.items(Style.QUOTE, nonMatchingProperties));
|
||||
}
|
||||
return ConditionOutcome.match(ConditionMessage
|
||||
.forCondition(ConditionalOnProperty.class, spec).because("matched"));
|
||||
|
||||
@@ -32,7 +32,8 @@ public enum SearchStrategy {
|
||||
* Search all parents and ancestors, but not the current context.
|
||||
* @deprecated as of 1.5 in favor of {@link SearchStrategy#ANCESTORS}
|
||||
*/
|
||||
@Deprecated PARENTS,
|
||||
@Deprecated
|
||||
PARENTS,
|
||||
|
||||
/**
|
||||
* Search all ancestors, but not the current context.
|
||||
|
||||
@@ -229,7 +229,7 @@ public class RedisAutoConfiguration {
|
||||
@ConditionalOnMissingBean(name = "redisTemplate")
|
||||
public RedisTemplate<Object, Object> redisTemplate(
|
||||
RedisConnectionFactory redisConnectionFactory)
|
||||
throws UnknownHostException {
|
||||
throws UnknownHostException {
|
||||
RedisTemplate<Object, Object> template = new RedisTemplate<Object, Object>();
|
||||
template.setConnectionFactory(redisConnectionFactory);
|
||||
return template;
|
||||
@@ -239,7 +239,7 @@ public class RedisAutoConfiguration {
|
||||
@ConditionalOnMissingBean(StringRedisTemplate.class)
|
||||
public StringRedisTemplate stringRedisTemplate(
|
||||
RedisConnectionFactory redisConnectionFactory)
|
||||
throws UnknownHostException {
|
||||
throws UnknownHostException {
|
||||
StringRedisTemplate template = new StringRedisTemplate();
|
||||
template.setConnectionFactory(redisConnectionFactory);
|
||||
return template;
|
||||
|
||||
@@ -109,9 +109,8 @@ public class FlywayAutoConfiguration {
|
||||
Assert.state(!this.properties.getLocations().isEmpty(),
|
||||
"Migration script locations not configured");
|
||||
boolean exists = hasAtLeastOneLocation();
|
||||
Assert.state(exists,
|
||||
"Cannot find migrations location in: " + this.properties
|
||||
.getLocations()
|
||||
Assert.state(exists, "Cannot find migrations location in: "
|
||||
+ this.properties.getLocations()
|
||||
+ " (please add migrations or check your Flyway configuration)");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class ActiveMQConnectionFactoryFactory {
|
||||
|
||||
private <T extends ActiveMQConnectionFactory> T createConnectionFactoryInstance(
|
||||
Class<T> factoryClass) throws InstantiationException, IllegalAccessException,
|
||||
InvocationTargetException, NoSuchMethodException {
|
||||
InvocationTargetException, NoSuchMethodException {
|
||||
String brokerUrl = determineBrokerUrl();
|
||||
String user = this.properties.getUser();
|
||||
String password = this.properties.getPassword();
|
||||
|
||||
@@ -47,7 +47,7 @@ class ArtemisXAConnectionFactoryConfiguration {
|
||||
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
|
||||
public ConnectionFactory jmsConnectionFactory(ListableBeanFactory beanFactory,
|
||||
ArtemisProperties properties, XAConnectionFactoryWrapper wrapper)
|
||||
throws Exception {
|
||||
throws Exception {
|
||||
return wrapper.wrapConnectionFactory(
|
||||
new ArtemisConnectionFactoryFactory(beanFactory, properties)
|
||||
.createConnectionFactory(ActiveMQXAConnectionFactory.class));
|
||||
|
||||
@@ -41,8 +41,8 @@ class EnableOAuth2SsoCondition extends SpringBootCondition {
|
||||
for (String name : enablers) {
|
||||
if (context.getBeanFactory().isTypeMatch(name,
|
||||
WebSecurityConfigurerAdapter.class)) {
|
||||
return ConditionOutcome.match(message
|
||||
.found("@EnableOAuth2Sso annotation on WebSecurityConfigurerAdapter")
|
||||
return ConditionOutcome.match(message.found(
|
||||
"@EnableOAuth2Sso annotation on WebSecurityConfigurerAdapter")
|
||||
.items(name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,10 +288,9 @@ public class WebMvcAutoConfiguration {
|
||||
}
|
||||
Integer cachePeriod = this.resourceProperties.getCachePeriod();
|
||||
if (!registry.hasMappingForPattern("/webjars/**")) {
|
||||
customizeResourceHandlerRegistration(
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations(
|
||||
"classpath:/META-INF/resources/webjars/")
|
||||
customizeResourceHandlerRegistration(registry
|
||||
.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/")
|
||||
.setCachePeriod(cachePeriod));
|
||||
}
|
||||
String staticPathPattern = this.mvcProperties.getStaticPathPattern();
|
||||
@@ -300,7 +299,7 @@ public class WebMvcAutoConfiguration {
|
||||
registry.addResourceHandler(staticPathPattern)
|
||||
.addResourceLocations(
|
||||
this.resourceProperties.getStaticLocations())
|
||||
.setCachePeriod(cachePeriod));
|
||||
.setCachePeriod(cachePeriod));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -194,15 +194,17 @@ public class NoSuchBeanDefinitionFailureAnalyzerTests {
|
||||
}
|
||||
|
||||
private void assertActionMissingType(FailureAnalysis analysis, Class<?> type) {
|
||||
assertThat(analysis.getAction()).startsWith(String
|
||||
.format("Consider revisiting the conditions above or defining a bean of type '%s' "
|
||||
+ "in your configuration.", type.getName()));
|
||||
assertThat(analysis.getAction()).startsWith(String.format(
|
||||
"Consider revisiting the conditions above or defining a bean of type '%s' "
|
||||
+ "in your configuration.",
|
||||
type.getName()));
|
||||
}
|
||||
|
||||
private void assertActionMissingName(FailureAnalysis analysis, String name) {
|
||||
assertThat(analysis.getAction()).startsWith(String
|
||||
.format("Consider revisiting the conditions above or defining a bean named '%s' "
|
||||
+ "in your configuration.", name));
|
||||
assertThat(analysis.getAction()).startsWith(String.format(
|
||||
"Consider revisiting the conditions above or defining a bean named '%s' "
|
||||
+ "in your configuration.",
|
||||
name));
|
||||
}
|
||||
|
||||
private void assertBeanMethodDisabled(FailureAnalysis analysis, String description,
|
||||
|
||||
@@ -492,7 +492,7 @@ public class JacksonAutoConfigurationTests {
|
||||
@Override
|
||||
public void serialize(Foo value, JsonGenerator jgen,
|
||||
SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
throws IOException, JsonProcessingException {
|
||||
jgen.writeStartObject();
|
||||
jgen.writeStringField("foo", "bar");
|
||||
jgen.writeEndObject();
|
||||
|
||||
@@ -140,16 +140,15 @@ public class DataSourceInitializerTests {
|
||||
|
||||
@Test
|
||||
public void testDataSourceInitializedWithMultipleScripts() throws Exception {
|
||||
EnvironmentTestUtils.addEnvironment(this.context,
|
||||
"spring.datasource.initialize:true",
|
||||
"spring.datasource.schema:"
|
||||
+ ClassUtils.addResourcePathToPackagePath(getClass(),
|
||||
"schema.sql")
|
||||
+ ","
|
||||
+ ClassUtils.addResourcePathToPackagePath(getClass(),
|
||||
"another.sql"),
|
||||
"spring.datasource.data:" + ClassUtils
|
||||
.addResourcePathToPackagePath(getClass(), "data.sql"));
|
||||
EnvironmentTestUtils
|
||||
.addEnvironment(this.context, "spring.datasource.initialize:true",
|
||||
"spring.datasource.schema:" + ClassUtils
|
||||
.addResourcePathToPackagePath(getClass(), "schema.sql")
|
||||
+ ","
|
||||
+ ClassUtils.addResourcePathToPackagePath(getClass(),
|
||||
"another.sql"),
|
||||
"spring.datasource.data:" + ClassUtils
|
||||
.addResourcePathToPackagePath(getClass(), "data.sql"));
|
||||
this.context.register(DataSourceAutoConfiguration.class,
|
||||
PropertyPlaceholderAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
|
||||
@@ -104,8 +104,10 @@ public class SecurityAutoConfigurationTests {
|
||||
ServerPropertiesAutoConfiguration.class,
|
||||
PropertyPlaceholderAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
assertThat(this.context.getBean("securityFilterChainRegistration",
|
||||
DelegatingFilterProxyRegistrationBean.class).getOrder()).isEqualTo(
|
||||
assertThat(this.context
|
||||
.getBean("securityFilterChainRegistration",
|
||||
DelegatingFilterProxyRegistrationBean.class)
|
||||
.getOrder()).isEqualTo(
|
||||
FilterRegistrationBean.REQUEST_WRAPPER_FILTER_MAX_ORDER - 100);
|
||||
}
|
||||
|
||||
@@ -134,8 +136,10 @@ public class SecurityAutoConfigurationTests {
|
||||
ServerPropertiesAutoConfiguration.class,
|
||||
PropertyPlaceholderAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
assertThat(this.context.getBean("securityFilterChainRegistration",
|
||||
DelegatingFilterProxyRegistrationBean.class).getOrder()).isEqualTo(
|
||||
assertThat(this.context
|
||||
.getBean("securityFilterChainRegistration",
|
||||
DelegatingFilterProxyRegistrationBean.class)
|
||||
.getOrder()).isEqualTo(
|
||||
FilterRegistrationBean.REQUEST_WRAPPER_FILTER_MAX_ORDER - 100);
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ public class BasicErrorControllerIntegrationTests {
|
||||
@Override
|
||||
protected void renderMergedOutputModel(Map<String, Object> model,
|
||||
HttpServletRequest request, HttpServletResponse response)
|
||||
throws Exception {
|
||||
throws Exception {
|
||||
response.getWriter().write("ERROR_BEAN");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -150,7 +150,7 @@ public class BasicErrorControllerMockMvcTests {
|
||||
@Override
|
||||
protected void renderMergedOutputModel(Map<String, Object> model,
|
||||
HttpServletRequest request, HttpServletResponse response)
|
||||
throws Exception {
|
||||
throws Exception {
|
||||
response.getWriter().write("ERROR_BEAN");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -803,7 +803,7 @@ public class WebMvcAutoConfigurationTests {
|
||||
@Override
|
||||
protected void renderMergedOutputModel(Map<String, Object> model,
|
||||
HttpServletRequest request, HttpServletResponse response)
|
||||
throws Exception {
|
||||
throws Exception {
|
||||
response.getOutputStream().write("Hello World".getBytes());
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user