This is an automated email from the ASF dual-hosted git repository.
remm 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 91b9b78 Avoid JMX stacktraces when ruinning the testsuite
91b9b78 is described below
commit 91b9b78501407be0e2a758fa36118bb32e612faa
Author: remm <[email protected]>
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 0167b05..4d34c80 100644
--- a/java/org/apache/coyote/http2/Http2Protocol.java
+++ b/java/org/apache/coyote/http2/Http2Protocol.java
@@ -455,7 +455,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: [email protected]
For additional commands, e-mail: [email protected]