You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/03/12 21:37:03 UTC

[commons-configuration] branch master updated: Replace lambdas with method references. (#271)

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


The following commit(s) were added to refs/heads/master by this push:
     new 09a3c729 Replace lambdas with method references. (#271)
09a3c729 is described below

commit 09a3c72986ecd6bfb1f4e6e4276349971a0ec6b4
Author: Arturo Bernal <ar...@gmail.com>
AuthorDate: Sun Mar 12 22:36:57 2023 +0100

    Replace lambdas with method references. (#271)
---
 .../apache/commons/configuration2/DynamicCombinedConfiguration.java    | 3 ++-
 src/main/java/org/apache/commons/configuration2/tree/NodeTracker.java  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java b/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java
index 4ecbb283..38ba836e 100644
--- a/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
+import org.apache.commons.configuration2.event.BaseEventSource;
 import org.apache.commons.configuration2.event.Event;
 import org.apache.commons.configuration2.event.EventListener;
 import org.apache.commons.configuration2.event.EventType;
@@ -592,7 +593,7 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     public void clearErrorListeners() {
-        configs.values().forEach(cc -> cc.clearErrorListeners());
+        configs.values().forEach(BaseEventSource::clearErrorListeners);
         super.clearErrorListeners();
     }
 
diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeTracker.java b/src/main/java/org/apache/commons/configuration2/tree/NodeTracker.java
index 375c9efc..633fd852 100644
--- a/src/main/java/org/apache/commons/configuration2/tree/NodeTracker.java
+++ b/src/main/java/org/apache/commons/configuration2/tree/NodeTracker.java
@@ -213,7 +213,7 @@ class NodeTracker {
             return this;
         }
         return new NodeTracker(trackedNodes.entrySet().stream()
-            .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue().isDetached() ? e.getValue() : e.getValue().detach(null))));
+            .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().isDetached() ? e.getValue() : e.getValue().detach(null))));
     }
 
     /**