This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 88ea24e  Move null check for context to before the first use of context
88ea24e is described below

commit 88ea24ecb4815e9cec2912b1cac01ee6e465a5de
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Nov 3 14:49:12 2021 +0000

    Move null check for context to before the first use of context
---
 java/org/apache/catalina/webresources/StandardRoot.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/webresources/StandardRoot.java 
b/java/org/apache/catalina/webresources/StandardRoot.java
index 0aad50e..6238e39 100644
--- a/java/org/apache/catalina/webresources/StandardRoot.java
+++ b/java/org/apache/catalina/webresources/StandardRoot.java
@@ -677,15 +677,15 @@ public class StandardRoot extends LifecycleMBeanBase 
implements WebResourceRoot
     protected void initInternal() throws LifecycleException {
         super.initInternal();
 
-        cacheJmxName = register(cache, getObjectNameKeyProperties() + 
",name=Cache");
-
-        registerURLStreamHandlerFactory();
-
         if (context == null) {
             throw new IllegalStateException(
                     sm.getString("standardRoot.noContext"));
         }
 
+        cacheJmxName = register(cache, getObjectNameKeyProperties() + 
",name=Cache");
+
+        registerURLStreamHandlerFactory();
+
         for (List<WebResourceSet> list : allResources) {
             for (WebResourceSet webResourceSet : list) {
                 webResourceSet.init();

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

Reply via email to