Merge pull request #16446 from za-rudeboy

* pr/16446:
  Polish "Polish embedded tomcat setup"
  Polish embedded tomcat setup
This commit is contained in:
Stephane Nicoll
2019-04-05 08:45:07 +02:00
3 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
@@ -55,7 +55,7 @@ class TomcatEmbeddedContext extends StandardContext {
@Override
public void setManager(Manager manager) {
if (manager instanceof ManagerBase) {
((ManagerBase) manager).setSessionIdGenerator(new LazySessionIdGenerator());
manager.setSessionIdGenerator(new LazySessionIdGenerator());
}
super.setManager(manager);
}

View File

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

View File

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