pull/9938/merge
Andy Wilkinson 7 years ago
parent 53e8ade4d3
commit 7bd285dd93

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save