Skip to content

Commit

Permalink
Comparison moved to the caller
Browse files Browse the repository at this point in the history
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
  • Loading branch information
dmatej committed Nov 14, 2022
1 parent c86b79b commit 6f906c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Expand Up @@ -91,12 +91,8 @@ public class TomcatDeploymentConfig {
*/
public static void configureWebModule(WebModule webModule, WebBundleDescriptorImpl webModuleDescriptor)
throws LifecycleException {
logger.log(Level.FINEST, "configureWebModule(webModule={0}, webModuleDescriptor={1})",
new Object[] {webModule, webModuleDescriptor});
// When context root = "/"
if (webModuleDescriptor == null) {
return;
}
logger.log(Level.FINEST, "configureWebModule(webModule={0}, webModuleDescriptor.class={1})",
new Object[] {webModule, webModuleDescriptor.getClass()});
webModule.setDisplayName(webModuleDescriptor.getDisplayName());
webModule.setDistributable(webModuleDescriptor.isDistributable());
webModule.setReplaceWelcomeFiles(true);
Expand Down
Expand Up @@ -210,10 +210,12 @@ protected synchronized void start() throws LifecycleException {
}

try {
TomcatDeploymentConfig.configureWebModule((WebModule) context, webBundleDescriptor);
// When context root = "/"
if (webBundleDescriptor != null) {
TomcatDeploymentConfig.configureWebModule((WebModule) context, webBundleDescriptor);
}
authenticatorConfig();
managerConfig();

context.setConfigured(true);
} catch (Throwable t) {
// clean up naming in case of errors
Expand Down

0 comments on commit 6f906c6

Please sign in to comment.