Author: kkolinko
Date: Sun Apr 13 10:57:23 2014
New Revision: 1586959
URL: http://svn.apache.org/r1586959
Log:
Followup to r1586897 :
Apply the same not-null optimization to
removeAttributeChangeNotificationListener method.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java
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=1586959&r1=1586958&r2=1586959&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java Sun
Apr 13 10:57:23 2014
@@ -624,11 +624,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);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]