Browse Source

Ignore fire plugin state event without state change

pull/566/head
Decebal Suiu 10 months ago
parent
commit
6e4e6b3781
  1. 5
      pf4j/src/main/java/org/pf4j/AbstractPluginManager.java

5
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java

@ -861,6 +861,11 @@ public abstract class AbstractPluginManager implements PluginManager {
* @param event the plugin state event
*/
protected synchronized void firePluginStateEvent(PluginStateEvent event) {
if (event.getPluginState() == event.getOldState()) {
// ignore events without state change
return;
}
for (PluginStateListener listener : pluginStateListeners) {
log.trace("Fire '{}' to '{}'", event, listener);
listener.pluginStateChanged(event);

Loading…
Cancel
Save