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 2020/02/05 14:48:27 UTC

[tomcat] 03/03: Refactor secret check

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 26e411dbcf8fd047d631a2ecde70f2dd14be1ada
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Feb 5 14:47:48 2020 +0000

    Refactor secret check
    
    Moving the check to start allows invalid configurations to be fixed via
    JMX and changes to be made followed by stop()/start() for those changes
    to take effect.
---
 java/org/apache/coyote/ajp/AbstractAjpProtocol.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
index 63ff6c5..7cfdf0a 100644
--- a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
+++ b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
@@ -257,13 +257,13 @@ public abstract class AbstractAjpProtocol<S> extends AbstractProtocol<S> {
 
 
     @Override
-    public void init() throws Exception {
+    public void start() throws Exception {
         if (getSecretRequired()) {
             String secret = getSecret();
             if (secret == null || secret.length() == 0) {
                 throw new IllegalArgumentException(sm.getString("ajpprotocol.nosecret"));
             }
         }
-        super.init();
+        super.start();
     }
 }


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