Browse Source

Clean up warnings related to forthcoming removals in Tomcat 9

pull/1179/head
Sam Brannen 9 years ago
parent
commit
b521aa879f
  1. 2
      spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/TomcatHttpServer.java
  2. 6
      spring-websocket/src/test/java/org/springframework/web/socket/TomcatWebSocketTestServer.java

2
spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/TomcatHttpServer.java

@ -59,7 +59,7 @@ public class TomcatHttpServer extends HttpServerSupport implements HttpServer, I @@ -59,7 +59,7 @@ public class TomcatHttpServer extends HttpServerSupport implements HttpServer, I
File base = new File(System.getProperty("java.io.tmpdir"));
Context rootContext = tomcatServer.addContext("", base.getAbsolutePath());
Tomcat.addServlet(rootContext, "httpHandlerServlet", servlet);
rootContext.addServletMapping("/", "httpHandlerServlet");
rootContext.addServletMappingDecoded("/", "httpHandlerServlet");
}

6
spring-websocket/src/test/java/org/springframework/web/socket/TomcatWebSocketTestServer.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -95,9 +95,9 @@ public class TomcatWebSocketTestServer implements WebSocketTestServer { @@ -95,9 +95,9 @@ public class TomcatWebSocketTestServer implements WebSocketTestServer {
public void deployConfig(WebApplicationContext wac, Filter... filters) {
Assert.state(this.port != -1, "setup() was never called.");
this.context = this.tomcatServer.addContext("", System.getProperty("java.io.tmpdir"));
this.context.addApplicationListener(WsContextListener.class.getName());
this.context.addApplicationListener(WsContextListener.class.getName());
Tomcat.addServlet(this.context, "dispatcherServlet", new DispatcherServlet(wac)).setAsyncSupported(true);
this.context.addServletMapping("/", "dispatcherServlet");
this.context.addServletMappingDecoded("/", "dispatcherServlet");
for (Filter filter : filters) {
FilterDef filterDef = new FilterDef();
filterDef.setFilterName(filter.getClass().getName());

Loading…
Cancel
Save