diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryWebEndpointServletHandlerMapping.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryWebEndpointServletHandlerMapping.java index bb2331e7bc..472535cf6b 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryWebEndpointServletHandlerMapping.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryWebEndpointServletHandlerMapping.java @@ -25,6 +25,9 @@ import java.util.stream.Collectors; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.SecurityResponse; import org.springframework.boot.actuate.endpoint.EndpointId; @@ -51,6 +54,8 @@ import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMappi */ class CloudFoundryWebEndpointServletHandlerMapping extends AbstractWebMvcEndpointHandlerMapping { + private static final Log logger = LogFactory.getLog(CloudFoundryWebEndpointServletHandlerMapping.class); + private final CloudFoundrySecurityInterceptor securityInterceptor; private final EndpointLinksResolver linksResolver; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MockedDriverConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MockedDriverConfiguration.java index 6c7fda56e8..8c2a1a611f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MockedDriverConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MockedDriverConfiguration.java @@ -16,7 +16,7 @@ package org.springframework.boot.autoconfigure.data.neo4j; -import org.mockito.Mockito; +import org.mockito.ArgumentMatchers; import org.neo4j.driver.Driver; import org.neo4j.driver.Session; import org.neo4j.driver.SessionConfig; @@ -43,7 +43,7 @@ class MockedDriverConfiguration { TypeSystem typeSystem = mock(TypeSystem.class); Session session = mock(Session.class); given(driver.defaultTypeSystem()).willReturn(typeSystem); - given(driver.session(Mockito.any(SessionConfig.class))).willReturn(session); + given(driver.session(ArgumentMatchers.any(SessionConfig.class))).willReturn(session); return driver; } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/AbstractPackagerTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/AbstractPackagerTests.java index 8051f97923..afeacd673d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/AbstractPackagerTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/AbstractPackagerTests.java @@ -644,7 +644,7 @@ abstract class AbstractPackagerTests

{ private static final Layer DEFAULT_LAYER = new Layer("default"); - private Set layers = new LinkedHashSet(); + private Set layers = new LinkedHashSet<>(); private Map libraries = new HashMap<>(); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java index f78eea4c2d..ba7fe79e8b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java @@ -643,7 +643,7 @@ class JarFileTests { @Test void iterator() { Iterator iterator = this.jarFile.iterator(); - List names = new ArrayList(); + List names = new ArrayList<>(); while (iterator.hasNext()) { names.add(iterator.next().getName()); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java index 335e3654af..e4b485105c 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java @@ -82,7 +82,7 @@ public abstract class AbstractServletWebServerFactory extends AbstractConfigurab private final StaticResourceJars staticResourceJars = new StaticResourceJars(); - private final Set webListenerClassNames = new HashSet(); + private final Set webListenerClassNames = new HashSet<>(); /** * Create a new {@link AbstractServletWebServerFactory} instance. diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertySourcesTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertySourcesTests.java index c10bad6e42..b13217af1f 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertySourcesTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertySourcesTests.java @@ -203,7 +203,7 @@ class ConfigurationPropertySourcesTests { } private static Map createProperties(int index) { - Map map = new LinkedHashMap(); + Map map = new LinkedHashMap<>(); for (int i = 0; i < 1000; i++) { String name = "test-" + index + "-property-" + i; String value = name + "-value";