Clean up warnings related to forthcoming removals in Tomcat 9

This commit is contained in:
Sam Brannen 2016-09-17 16:10:45 +02:00
parent 8f62b63663
commit b521aa879f
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -95,9 +95,9 @@ public class TomcatWebSocketTestServer implements WebSocketTestServer {
public void deployConfig(WebApplicationContext wac, Filter... filters) { public void deployConfig(WebApplicationContext wac, Filter... filters) {
Assert.state(this.port != -1, "setup() was never called."); Assert.state(this.port != -1, "setup() was never called.");
this.context = this.tomcatServer.addContext("", System.getProperty("java.io.tmpdir")); 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); Tomcat.addServlet(this.context, "dispatcherServlet", new DispatcherServlet(wac)).setAsyncSupported(true);
this.context.addServletMapping("/", "dispatcherServlet"); this.context.addServletMappingDecoded("/", "dispatcherServlet");
for (Filter filter : filters) { for (Filter filter : filters) {
FilterDef filterDef = new FilterDef(); FilterDef filterDef = new FilterDef();
filterDef.setFilterName(filter.getClass().getName()); filterDef.setFilterName(filter.getClass().getName());