This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-configuration.git
commit 0d169b3d7066849762aff6f39558109caa3e82b6 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sat Jul 16 12:43:53 2022 -0400 Use forEach() --- .../commons/configuration2/io/FileHandler.java | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/apache/commons/configuration2/io/FileHandler.java b/src/main/java/org/apache/commons/configuration2/io/FileHandler.java index 387b3c50..b3bbe172 100644 --- a/src/main/java/org/apache/commons/configuration2/io/FileHandler.java +++ b/src/main/java/org/apache/commons/configuration2/io/FileHandler.java @@ -370,45 +370,35 @@ public class FileHandler { * Notifies the registered listeners about a completed load operation. */ private void fireLoadedEvent() { - for (final FileHandlerListener l : listeners) { - l.loaded(this); - } + listeners.forEach(l -> l.loaded(this)); } /** * Notifies the registered listeners about the start of a load operation. */ private void fireLoadingEvent() { - for (final FileHandlerListener l : listeners) { - l.loading(this); - } + listeners.forEach(l -> l.loading(this)); } /** * Notifies the registered listeners about a property update. */ private void fireLocationChangedEvent() { - for (final FileHandlerListener l : listeners) { - l.locationChanged(this); - } + listeners.forEach(l -> l.locationChanged(this)); } /** * Notifies the registered listeners about a completed save operation. */ private void fireSavedEvent() { - for (final FileHandlerListener l : listeners) { - l.saved(this); - } + listeners.forEach(l -> l.saved(this)); } /** * Notifies the registered listeners about the start of a save operation. */ private void fireSavingEvent() { - for (final FileHandlerListener l : listeners) { - l.saving(this); - } + listeners.forEach(l -> l.saving(this)); } /**