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 <[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 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: [email protected]
For additional commands, e-mail: [email protected]