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 2022/08/06 18:04:01 UTC
[commons-configuration] 04/05: Refactor
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 d933a5596e650d9ddfba3447bcfc982c9300515b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 6 13:52:05 2022 -0400
Refactor
---
.../org/apache/commons/configuration2/tree/OverrideCombiner.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/commons/configuration2/tree/OverrideCombiner.java b/src/main/java/org/apache/commons/configuration2/tree/OverrideCombiner.java
index 1477b5ee..84c1ce3c 100644
--- a/src/main/java/org/apache/commons/configuration2/tree/OverrideCombiner.java
+++ b/src/main/java/org/apache/commons/configuration2/tree/OverrideCombiner.java
@@ -55,11 +55,7 @@ public class OverrideCombiner extends NodeCombiner {
// Process nodes from the first structure, which override the second
node1.forEach(child -> {
final ImmutableNode child2 = canCombine(node1, node2, child);
- if (child2 != null) {
- result.addChild(combine(child, child2));
- } else {
- result.addChild(child);
- }
+ result.addChild(child2 != null ? combine(child, child2) : child);
});
// Process nodes from the second structure, which are not contained