Author: markt
Date: Sat Apr 12 20:43:34 2014
New Revision: 1586894
URL: http://svn.apache.org/r1586894
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/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java?rev=1586894&r1=1586893&r2=1586894&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java Sat
Apr 12 20:43:34 2014
@@ -860,12 +860,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);
+ }
+ }
public String getModelerType() {
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1586894&r1=1586893&r2=1586894&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sat Apr 12 20:43:34 2014
@@ -88,6 +88,11 @@
entry is invalidated by being overridden by a new resource in a
different <code>WebResourceSet</code>. (markt)
</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: [email protected]
For additional commands, e-mail: [email protected]