You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/08 12:04:30 UTC
[tomcat] 03/04: Simplify code. We already have the Service for this
Context so use it.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit cc90fc683f36d7c853b7bde56f36a570a131d6c6
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Jul 8 10:14:52 2019 +0100
Simplify code. We already have the Service for this Context so use it.
---
java/org/apache/catalina/core/ApplicationContext.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/core/ApplicationContext.java b/java/org/apache/catalina/core/ApplicationContext.java
index fe70a32..79f2a8b 100644
--- a/java/org/apache/catalina/core/ApplicationContext.java
+++ b/java/org/apache/catalina/core/ApplicationContext.java
@@ -261,7 +261,7 @@ public class ApplicationContext implements ServletContext {
pathMB.setString(uri);
MappingData mappingData = new MappingData();
- ((Engine) host.getParent()).getService().getMapper().map(hostMB, pathMB, null, mappingData);
+ service.getMapper().map(hostMB, pathMB, null, mappingData);
child = mappingData.context;
}
} catch (Throwable t) {
@@ -1010,8 +1010,7 @@ public class ApplicationContext implements ServletContext {
// SSL not enabled by default as it can only used on its own
// Context > Host > Engine > Service
- Service s = ((Engine) context.getParent().getParent()).getService();
- Connector[] connectors = s.findConnectors();
+ Connector[] connectors = service.findConnectors();
// Need at least one SSL enabled connector to use the SSL session ID.
for (Connector connector : connectors) {
if (Boolean.TRUE.equals(connector.getAttribute("SSLEnabled"))) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org