This commit is contained in:
Andy Wilkinson 2017-08-03 14:39:46 +01:00
parent 53e8ade4d3
commit 7bd285dd93
13 changed files with 15 additions and 7 deletions

View File

@ -25,6 +25,7 @@ import org.apache.activemq.ActiveMQConnectionFactory;
* @author Stephane Nicoll
* @since 1.5.5
*/
@FunctionalInterface
public interface ActiveMQConnectionFactoryCustomizer {
/**

View File

@ -26,6 +26,7 @@ import org.springframework.scheduling.quartz.SchedulerFactoryBean;
* @author Vedran Pavic
* @since 2.0.0
*/
@FunctionalInterface
public interface SchedulerFactoryBeanCustomizer {
/**

View File

@ -228,7 +228,7 @@ public class SpringBootWebSecurityConfiguration {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.requestMatcher(request -> false);
http.requestMatcher((request) -> false);
}
}

View File

@ -446,8 +446,8 @@ public class DefaultServletWebServerFactoryCustomizer
private static void customizeMaxHttpPostSize(
UndertowServletWebServerFactory factory, final long maxHttpPostSize) {
factory.addBuilderCustomizers((builder -> builder
.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, maxHttpPostSize)));
factory.addBuilderCustomizers((builder) -> builder
.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, maxHttpPostSize));
}
}

View File

@ -170,7 +170,7 @@ public class RabbitAutoConfigurationTests {
this.contextRunner.withUserConfiguration(TestConfiguration.class)
.withPropertyValues("spring.rabbitmq.publisher-confirms=true",
"spring.rabbitmq.publisher-returns=true")
.run(context -> {
.run((context) -> {
CachingConnectionFactory connectionFactory = context
.getBean(CachingConnectionFactory.class);
RabbitTemplate rabbitTemplate = context.getBean(RabbitTemplate.class);
@ -238,7 +238,7 @@ public class RabbitAutoConfigurationTests {
this.contextRunner.withUserConfiguration(TestConfiguration.class)
.withPropertyValues("spring.rabbitmq.template.mandatory:false",
"spring.rabbitmq.publisher-returns=true")
.run(context -> {
.run((context) -> {
RabbitTemplate rabbitTemplate = context.getBean(RabbitTemplate.class);
assertThat(getMandatory(rabbitTemplate)).isFalse();
});

View File

@ -120,7 +120,7 @@ public class ConditionalOnBeanTests {
WithPropertyPlaceholderClassName.class,
OnBeanClassConfiguration.class)
.withPropertyValues("mybeanclass=java.lang.String")
.run(context -> assertThat(context).hasNotFailed());
.run((context) -> assertThat(context).hasNotFailed());
}
@Test

View File

@ -113,7 +113,7 @@ final class JavaPluginAction implements PluginApplicationAction {
}
private void configureUtf8Encoding(Project project) {
project.afterEvaluate(evaluated -> evaluated.getTasks()
project.afterEvaluate((evaluated) -> evaluated.getTasks()
.withType(JavaCompile.class, (compile) -> {
if (compile.getOptions().getEncoding() == null) {
compile.getOptions().setEncoding("UTF-8");

View File

@ -214,6 +214,7 @@ public abstract class MockServletWebServer {
/**
* Initializer (usually implement by adapting {@code Initializer}).
*/
@FunctionalInterface
protected interface Initializer {
void onStartup(ServletContext context) throws ServletException;

View File

@ -30,6 +30,7 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
* @since 2.0.0
* @see ApplicationContextAware
*/
@FunctionalInterface
public interface SpringBootExceptionReporter {
/**

View File

@ -40,6 +40,7 @@ import org.springframework.core.type.AnnotationMetadata;
* @author Andy Wilkinson
* @since 1.5.0
*/
@FunctionalInterface
public interface DeterminableImports {
/**

View File

@ -24,6 +24,7 @@ package org.springframework.boot.origin;
* @author Phillip Webb
* @since 2.0.0
*/
@FunctionalInterface
public interface OriginLookup<K> {
/**

View File

@ -23,6 +23,7 @@ package org.springframework.boot.origin;
* @since 2.0.0
* @see Origin
*/
@FunctionalInterface
public interface OriginProvider {
/**

View File

@ -36,6 +36,7 @@ import org.springframework.beans.factory.config.BeanPostProcessor;
* @since 2.0.0
* @see WebServerFactoryCustomizerBeanPostProcessor
*/
@FunctionalInterface
public interface WebServerFactoryCustomizer<T extends WebServerFactory> {
/**