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 2019/07/10 14:46:31 UTC

[tomcat] branch master updated: Avoid non fatal NPEs with Tribes when JMX is not available

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 e6eb0f3  Avoid non fatal NPEs with Tribes when JMX is not available
e6eb0f3 is described below

commit e6eb0f38c5c2137b212d7182bfb9926c656b59f3
Author: remm <re...@apache.org>
AuthorDate: Wed Jul 10 16:46:22 2019 +0200

    Avoid non fatal NPEs with Tribes when JMX is not available
---
 java/org/apache/catalina/tribes/jmx/JmxRegistry.java | 3 +++
 webapps/docs/changelog.xml                           | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/java/org/apache/catalina/tribes/jmx/JmxRegistry.java b/java/org/apache/catalina/tribes/jmx/JmxRegistry.java
index b4d4565..5c3893c 100644
--- a/java/org/apache/catalina/tribes/jmx/JmxRegistry.java
+++ b/java/org/apache/catalina/tribes/jmx/JmxRegistry.java
@@ -96,6 +96,9 @@ public class JmxRegistry {
     }
 
     public ObjectName registerJmx(String keyprop, Object bean) {
+        if (mbserver == null) {
+            return null;
+        }
         String oNameStr = baseOname.toString() + keyprop;
         ObjectName oName = null;
         try {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index dcd6634..a322c06 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -70,6 +70,9 @@
         membership. The namespace is still a failure on startup but it is easy
         to provide. (remm)
       </fix>
+      <fix>
+        Avoid non fatal NPEs with Tribes when JMX is not available. (remm)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">


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