Declare interfaces as @FunctionalInterface where feasible
This commit declares each of the following public interfaces as a @FunctionalInterface. - org.springframework.context.ApplicationContextInitializer - org.springframework.test.web.servlet.DispatcherServletCustomizer - org.springframework.validation.MessageCodeFormatter - org.springframework.util.IdGenerator - org.springframework.beans.factory.config.YamlProcessor.MatchCallback - org.springframework.beans.factory.config.YamlProcessor.DocumentMatcher Closes gh-25580
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,7 +28,7 @@ package org.springframework.context;
|
||||
*
|
||||
* <p>{@code ApplicationContextInitializer} processors are encouraged to detect
|
||||
* whether Spring's {@link org.springframework.core.Ordered Ordered} interface has been
|
||||
* implemented or if the @{@link org.springframework.core.annotation.Order Order}
|
||||
* implemented or if the {@link org.springframework.core.annotation.Order @Order}
|
||||
* annotation is present and to sort instances accordingly if so prior to invocation.
|
||||
*
|
||||
* @author Chris Beams
|
||||
@@ -39,6 +39,7 @@ package org.springframework.context;
|
||||
* @see org.springframework.web.servlet.FrameworkServlet#setContextInitializerClasses
|
||||
* @see org.springframework.web.servlet.FrameworkServlet#applyInitializers
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ApplicationContextInitializer<C extends ConfigurableApplicationContext> {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,6 +26,7 @@ import org.springframework.lang.Nullable;
|
||||
* @see DefaultMessageCodesResolver
|
||||
* @see DefaultMessageCodesResolver.Format
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface MessageCodeFormatter {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user