Remove logic accommodating Tomcat 8.0.x from TomcatServletWebServerFactory

We now require Tomcat 8.5.
pull/9217/head
Andy Wilkinson 8 years ago
parent 445344211d
commit 2a4ba89f8e

@ -196,12 +196,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
: ClassUtils.getDefaultClassLoader()); : ClassUtils.getDefaultClassLoader());
resetDefaultLocaleMapping(context); resetDefaultLocaleMapping(context);
addLocaleMappings(context); addLocaleMappings(context);
try { context.setUseRelativeRedirects(false);
context.setUseRelativeRedirects(false);
}
catch (NoSuchMethodError ex) {
// Tomcat is < 8.0.30. Continue
}
SkipPatternJarScanner.apply(context, this.tldSkipPatterns); SkipPatternJarScanner.apply(context, this.tldSkipPatterns);
WebappLoader loader = new WebappLoader(context.getParentClassLoader()); WebappLoader loader = new WebappLoader(context.getParentClassLoader());
loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName()); loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName());
@ -357,21 +352,13 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
protocol.setKeyPass(ssl.getKeyPassword()); protocol.setKeyPass(ssl.getKeyPassword());
protocol.setKeyAlias(ssl.getKeyAlias()); protocol.setKeyAlias(ssl.getKeyAlias());
String ciphers = StringUtils.arrayToCommaDelimitedString(ssl.getCiphers()); String ciphers = StringUtils.arrayToCommaDelimitedString(ssl.getCiphers());
protocol.setCiphers(StringUtils.hasText(ciphers) ? ciphers : null); if (StringUtils.hasText(ciphers)) {
protocol.setCiphers(ciphers);
}
if (ssl.getEnabledProtocols() != null) { if (ssl.getEnabledProtocols() != null) {
try { for (SSLHostConfig sslHostConfig : protocol.findSslHostConfigs()) {
for (SSLHostConfig sslHostConfig : protocol.findSslHostConfigs()) { sslHostConfig.setProtocols(StringUtils
sslHostConfig.setProtocols(StringUtils .arrayToCommaDelimitedString(ssl.getEnabledProtocols()));
.arrayToCommaDelimitedString(ssl.getEnabledProtocols()));
}
}
catch (NoSuchMethodError ex) {
// Tomcat 8.0.x or earlier
Assert.isTrue(
protocol.setProperty("sslEnabledProtocols",
StringUtils.arrayToCommaDelimitedString(
ssl.getEnabledProtocols())),
"Failed to set sslEnabledProtocols");
} }
} }
if (getSslStoreProvider() != null) { if (getSslStoreProvider() != null) {

Loading…
Cancel
Save