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 2020/12/23 10:19:14 UTC

[tomcat] branch master updated: Avoid JMX stacktraces when ruinning the testsuite

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

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 296766e  Avoid JMX stacktraces when ruinning the testsuite
296766e is described below

commit 296766ed66047115e409d69895f739e3b2a2c30d
Author: remm <re...@apache.org>
AuthorDate: Wed Dec 23 11:18:47 2020 +0100

    Avoid JMX stacktraces when ruinning the testsuite
---
 java/org/apache/coyote/http2/Http2Protocol.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Http2Protocol.java b/java/org/apache/coyote/http2/Http2Protocol.java
index 51ed086..bb13224 100644
--- a/java/org/apache/coyote/http2/Http2Protocol.java
+++ b/java/org/apache/coyote/http2/Http2Protocol.java
@@ -349,7 +349,10 @@ public class Http2Protocol implements UpgradeProtocol {
 
         try {
             ObjectName oname = this.http11Protocol.getONameForUpgrade(getUpgradeProtocolName());
-            Registry.getRegistry(null, null).registerComponent(global, oname, null);
+            // This can be null when running the testsuite
+            if (oname != null) {
+                Registry.getRegistry(null, null).registerComponent(global, oname, null);
+            }
         } catch (Exception e) {
             log.warn(sm.getString("http2Protocol.jmxRegistration.fail"), e);
         }


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