Skip to content

Commit

Permalink
Use local variable inside plugins listener
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasponce committed Aug 20, 2015
1 parent 7f03823 commit 3658097
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public StandaloneActionPluginListener(Map<String, ActionPluginListener> plugins)
public void process(Action action) {
try {
init();
if (ActionPlugins.getPlugins().isEmpty()) {
if (plugins.isEmpty()) {
msgLog.warnNoPluginsFound();
return;
}
Expand All @@ -60,7 +60,7 @@ public void process(Action action) {
return;
}
String actionPlugin = action.getActionPlugin();
ActionPluginListener plugin = ActionPlugins.getPlugins().get(actionPlugin);
ActionPluginListener plugin = plugins.get(actionPlugin);
if (plugin == null) {
log.debug("Received action [" + actionPlugin +
"] but no ActionPluginListener found on this deployment");
Expand All @@ -73,6 +73,7 @@ public void process(Action action) {
Map<String, String> mixedProps = mixProperties(properties, defaultProperties);

PluginMessage pluginMessage = new StandalonePluginMessage(action, mixedProps);

plugin.process(pluginMessage);
} else {
msgLog.warnCannotAccessToDefinitionsService();
Expand Down

0 comments on commit 3658097

Please sign in to comment.