mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish "Replace anonymous class with lambdas"
See gh-17040
This commit is contained in:
parent
46677e30cf
commit
114f9f9503
@ -68,7 +68,6 @@ import org.mockito.InOrder;
|
||||
|
||||
import org.springframework.boot.testsupport.rule.OutputCapture;
|
||||
import org.springframework.boot.web.server.WebServerException;
|
||||
import org.springframework.boot.web.servlet.ServletContextInitializer;
|
||||
import org.springframework.boot.web.servlet.server.AbstractServletWebServerFactory;
|
||||
import org.springframework.boot.web.servlet.server.AbstractServletWebServerFactoryTests;
|
||||
import org.springframework.core.io.ByteArrayResource;
|
||||
@ -538,13 +537,12 @@ public class TomcatServletWebServerFactoryTests
|
||||
throws IOException, URISyntaxException {
|
||||
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(0);
|
||||
AtomicReference<ServletContext> servletContextReference = new AtomicReference<>();
|
||||
factory.addInitializers((ServletContextInitializer) servletContext -> {
|
||||
factory.addInitializers((servletContext) -> {
|
||||
servletContextReference.set(servletContext);
|
||||
Dynamic servlet = servletContext.addServlet("upload", new HttpServlet() {
|
||||
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest req,
|
||||
HttpServletResponse resp)
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException {
|
||||
req.getParts();
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ import java.io.PrintWriter;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
@ -75,8 +74,6 @@ import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
import org.apache.http.ssl.PrivateKeyDetails;
|
||||
import org.apache.http.ssl.PrivateKeyStrategy;
|
||||
import org.apache.http.ssl.SSLContextBuilder;
|
||||
import org.apache.http.ssl.TrustStrategy;
|
||||
import org.apache.jasper.EmbeddedServletOptions;
|
||||
|
Loading…
Reference in New Issue
Block a user