You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2016/11/14 16:42:38 UTC

svn commit: r1769657 - /tomcat/tc8.5.x/trunk/java/org/apache/catalina/startup/Tomcat.java

Author: remm
Date: Mon Nov 14 16:42:38 2016
New Revision: 1769657

URL: http://svn.apache.org/viewvc?rev=1769657&view=rev
Log:
Follow up to 60368: Remove auto creation of connector on start, but getConnector will return a newly created default connector if there's none.

Modified:
    tomcat/tc8.5.x/trunk/java/org/apache/catalina/startup/Tomcat.java

Modified: tomcat/tc8.5.x/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1769657&r1=1769656&r2=1769657&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/catalina/startup/Tomcat.java Mon Nov 14 16:42:38 2016
@@ -138,7 +138,6 @@ public class Tomcat {
     protected int port = 8080;
     protected String hostname = "localhost";
     protected String basedir;
-    protected boolean defaultConnectorCreated = false;
 
     private final Map<String, String> userPass = new HashMap<>();
     private final Map<String, List<String>> userRoles = new HashMap<>();
@@ -327,7 +326,6 @@ public class Tomcat {
      */
     public void init() throws LifecycleException {
         getServer();
-        getConnector();
         server.init();
     }
 
@@ -339,7 +337,6 @@ public class Tomcat {
      */
     public void start() throws LifecycleException {
         getServer();
-        getConnector();
         server.start();
     }
 
@@ -409,9 +406,6 @@ public class Tomcat {
             return service.findConnectors()[0];
         }
 
-        if (defaultConnectorCreated) {
-            return null;
-        }
         // The same as in standard Tomcat configuration.
         // This creates an APR HTTP connector if AprLifecycleListener has been
         // configured (created) and Tomcat Native library is available.
@@ -419,7 +413,6 @@ public class Tomcat {
         Connector connector = new Connector("HTTP/1.1");
         connector.setPort(port);
         service.addConnector(connector);
-        defaultConnectorCreated = true;
         return connector;
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org