code: private void onEventListenerComponentRemoved(ComponentDescriptorRemovedEvent event,
          ComponentManager componentManager, ComponentDescriptor<?> descriptor)
      {
          EventListener removedEventListener = null;
          for (EventListener eventListener : getListenersByName().values()) {
              if (eventListener.getClass() == descriptor.getImplementation()) {
                  removedEventListener = eventListener;
              }
          }
  
          if (removedEventListener != null) {
              removeListener(removedEventListener.getName());
          }
      }
docs: An Event Listener Component has been dynamically unregistered in the system, remove it from our cache.
  
  @param event the event object containing the removed component descriptor
  @param componentManager the {@link ComponentManager} where the descriptor is registered
  @param descriptor the component descriptor removed from the component manager