Skip to content

Commit

Permalink
move construction of ConfigChangeEvent outside the lambda expression (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghbxxxx authored and beiwei30 committed Jan 31, 2019
1 parent 342f37a commit 93a8ee0
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,8 @@ public void onChange(com.ctrip.framework.apollo.model.ConfigChangeEvent changeEv
return;
}

listeners.forEach(listener -> {
ConfigChangeEvent event = new ConfigChangeEvent(key, change.getNewValue(), getChangeType(change));
listener.process(event);
}
);
ConfigChangeEvent event = new ConfigChangeEvent(key, change.getNewValue(), getChangeType(change));
listeners.forEach(listener -> listener.process(event));
}
}

Expand Down

0 comments on commit 93a8ee0

Please sign in to comment.