Skip to content

Commit 2dc8f49

Browse files
committed
Polish
1 parent dad6d4b commit 2dc8f49

File tree

7 files changed

+9
-21
lines changed

7 files changed

+9
-21
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertySource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
* @see OriginTrackedValue
3131
* @see #getConfigurationProperty(ConfigurationPropertyName)
3232
*/
33+
@FunctionalInterface
3334
public interface ConfigurationPropertySource {
3435

3536
/**

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedContext.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ public void setManager(Manager manager) {
6161
}
6262

6363
public void deferredLoadOnStartup() throws LifecycleException {
64-
doWithThreadContextClassLoader(getLoader().getClassLoader(), () -> {
65-
getLoadOnStartupWrappers(findChildren()).forEach(this::load);
66-
});
64+
doWithThreadContextClassLoader(getLoader().getClassLoader(),
65+
() -> getLoadOnStartupWrappers(findChildren()).forEach(this::load));
6766
}
6867

6968
private Stream<Wrapper> getLoadOnStartupWrappers(Container[] children) {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBean.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
import javax.servlet.FilterRegistration.Dynamic;
3030
import javax.servlet.ServletContext;
3131

32-
import org.apache.commons.logging.Log;
33-
import org.apache.commons.logging.LogFactory;
34-
3532
import org.springframework.util.Assert;
3633
import org.springframework.util.StringUtils;
3734

@@ -55,8 +52,6 @@ public abstract class AbstractFilterRegistrationBean<T extends Filter>
5552
@Deprecated
5653
protected static final int REQUEST_WRAPPER_FILTER_MAX_ORDER = 0;
5754

58-
private final Log logger = LogFactory.getLog(getClass());
59-
6055
private static final String[] DEFAULT_URL_MAPPINGS = { "/*" };
6156

6257
private Set<ServletRegistrationBean<?>> servletRegistrationBeans = new LinkedHashSet<>();

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletRegistrationBean.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
import javax.servlet.ServletContext;
2727
import javax.servlet.ServletRegistration;
2828

29-
import org.apache.commons.logging.Log;
30-
import org.apache.commons.logging.LogFactory;
31-
3229
import org.springframework.util.Assert;
3330
import org.springframework.util.ObjectUtils;
3431
import org.springframework.util.StringUtils;
@@ -54,8 +51,6 @@
5451
public class ServletRegistrationBean<T extends Servlet>
5552
extends DynamicRegistrationBean<ServletRegistration.Dynamic> {
5653

57-
private static final Log logger = LogFactory.getLog(ServletRegistrationBean.class);
58-
5954
private static final String[] DEFAULT_MAPPINGS = { "/*" };
6055

6156
private T servlet;

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/webservices/client/WebServiceTemplateCustomizer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* @author Dmytro Nosan
2525
* @since 2.1.0
2626
*/
27+
@FunctionalInterface
2728
public interface WebServiceTemplateCustomizer {
2829

2930
/**

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrarTests.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,9 @@ public void packagesConfiguredWithBasePackageClasses() {
8585
@Test
8686
public void packagesConfiguredWithBothValueAndBasePackages() {
8787
assertThatExceptionOfType(AnnotationConfigurationException.class)
88-
.isThrownBy(() -> {
89-
this.context = new AnnotationConfigApplicationContext(
90-
ValueAndBasePackages.class);
91-
}).withMessageContaining("'value'")
92-
.withMessageContaining("'basePackages'")
88+
.isThrownBy(() -> this.context = new AnnotationConfigApplicationContext(
89+
ValueAndBasePackages.class))
90+
.withMessageContaining("'value'").withMessageContaining("'basePackages'")
9391
.withMessageContaining("com.example.foo")
9492
.withMessageContaining("com.example.bar");
9593
}

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,8 @@ public void servletContextListenerContextDestroyedIsCalledWhenContainerIsStopped
10491049
@Test
10501050
public void exceptionThrownOnLoadFailureIsRethrown() {
10511051
AbstractServletWebServerFactory factory = getFactory();
1052-
this.webServer = factory.getWebServer((context) -> {
1053-
context.addServlet("failing", FailingServlet.class).setLoadOnStartup(0);
1054-
});
1052+
this.webServer = factory.getWebServer((context) -> context
1053+
.addServlet("failing", FailingServlet.class).setLoadOnStartup(0));
10551054
assertThatExceptionOfType(WebServerException.class)
10561055
.isThrownBy(this.webServer::start)
10571056
.satisfies(this::wrapsFailingServletException);

0 commit comments

Comments
 (0)