You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/04/24 10:49:58 UTC

svn commit: r1589638 - in /tomcat/tc6.0.x/trunk: ./ STATUS.txt java/org/apache/tomcat/util/modeler/BaseModelMBean.java webapps/docs/changelog.xml

Author: markt
Date: Thu Apr 24 08:49:58 2014
New Revision: 1589638

URL: http://svn.apache.org/r1589638
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56369
Ensure that removing an MBean notification listener reverts all the operations performed when adding an MBean notification listener.

Modified:
    tomcat/tc6.0.x/trunk/   (props changed)
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc6.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1586894,1586959
  Merged /tomcat/tc7.0.x/trunk:r1586897,1586960

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1589638&r1=1589637&r2=1589638&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Apr 24 08:49:58 2014
@@ -28,15 +28,6 @@ None
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56369
-  Ensure that removing an MBean notification listener
-  reverts all the operations performed when adding an MBean notification
-  listener.
-  http://svn.apache.org/r1586897
-  http://svn.apache.org/r1586960
-  +1: kkolinko, markt, remm
-  -1:
-
 * Back-port patch to allow different kinds of FIPS configuration.
   http://people.apache.org/~schultz/patches/tcnative.heartbleed.tomcat6.diff
   http://svn.apache.org/viewvc?view=revision&revision=r1587379

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java?rev=1589638&r1=1589637&r2=1589638&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java Thu Apr 24 08:49:58 2014
@@ -616,11 +616,11 @@ public class BaseModelMBean implements D
 
         if (listener == null)
             throw new IllegalArgumentException("Listener is null");
-        if (attributeBroadcaster == null)
-            attributeBroadcaster = new BaseNotificationBroadcaster();
 
         // FIXME - currently this removes *all* notifications for this listener
-        attributeBroadcaster.removeNotificationListener(listener);
+        if (attributeBroadcaster != null) {
+            attributeBroadcaster.removeNotificationListener(listener);
+        }
 
     }
 
@@ -871,12 +871,15 @@ public class BaseModelMBean implements D
 
         if (listener == null)
             throw new IllegalArgumentException("Listener is null");
-        if (generalBroadcaster == null)
-            generalBroadcaster = new BaseNotificationBroadcaster();
-        generalBroadcaster.removeNotificationListener(listener);
 
+        if (generalBroadcaster != null) {
+            generalBroadcaster.removeNotificationListener(listener);
+        }
 
-    }
+        if (attributeBroadcaster != null) {
+            attributeBroadcaster.removeNotificationListener(listener);
+        }
+     }
 
 
     /**

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1589638&r1=1589637&r2=1589638&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Apr 24 08:49:58 2014
@@ -82,6 +82,11 @@
         just the file name to refer to refer to the JavaEE schema on which they
         are based. (kkolinko)
       </fix>
+      <fix>
+        <bug>56369</bug>: Ensure that removing an MBean notification listener
+        reverts all the operations performed when adding an MBean notification
+        listener. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



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