NotificationBroadcasterSupport controls concurrent access to its internal list of listeners by using synchronized (this). This is a bad idea since this class is intended to be subclassed. If the subclass also does synchronized (this), or equivalently has synchronized methods, then unexpected deadlocks can arise.
|