Polish embedded tomcat setup

See gh-16446
pull/16474/head
Rudy Adams 6 years ago committed by Stephane Nicoll
parent 7587af343d
commit 06028f83b2

@ -55,7 +55,7 @@ class TomcatEmbeddedContext extends StandardContext {
@Override @Override
public void setManager(Manager manager) { public void setManager(Manager manager) {
if (manager instanceof ManagerBase) { if (manager instanceof ManagerBase) {
((ManagerBase) manager).setSessionIdGenerator(new LazySessionIdGenerator()); manager.setSessionIdGenerator(new LazySessionIdGenerator());
} }
super.setManager(manager); super.setManager(manager);
} }

@ -66,7 +66,7 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac
private File baseDirectory; private File baseDirectory;
private List<Valve> engineValves = new ArrayList<>(); private final List<Valve> engineValves = new ArrayList<>();
private List<LifecycleListener> contextLifecycleListeners = getDefaultLifecycleListeners(); private List<LifecycleListener> contextLifecycleListeners = getDefaultLifecycleListeners();

@ -121,7 +121,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
private List<TomcatProtocolHandlerCustomizer<?>> tomcatProtocolHandlerCustomizers = new ArrayList<>(); private List<TomcatProtocolHandlerCustomizer<?>> tomcatProtocolHandlerCustomizers = new ArrayList<>();
private List<Connector> additionalTomcatConnectors = new ArrayList<>(); private final List<Connector> additionalTomcatConnectors = new ArrayList<>();
private ResourceLoader resourceLoader; private ResourceLoader resourceLoader;
@ -717,7 +717,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
if (event.getType().equals(Lifecycle.START_EVENT)) { if (event.getType().equals(Lifecycle.START_EVENT)) {
Context context = (Context) event.getLifecycle(); Context context = (Context) event.getLifecycle();
Manager manager = context.getManager(); Manager manager = context.getManager();
if (manager != null && manager instanceof StandardManager) { if (manager instanceof StandardManager) {
((StandardManager) manager).setPathname(null); ((StandardManager) manager).setPathname(null);
} }
} }

Loading…
Cancel
Save