Compare commits
2 Commits
776c898c4b
...
eb4692e4ee
Author | SHA1 | Date |
---|---|---|
Claudio Atzori | eb4692e4ee | |
Claudio Atzori | 24a83fc24f |
|
@ -270,8 +270,9 @@ public class MergeUtils {
|
|||
}
|
||||
|
||||
HashMap<String, KeyValue> values = new HashMap<>();
|
||||
left.forEach(kv -> values.put(kv.getKey(), kv));
|
||||
right.forEach(kv -> values.putIfAbsent(kv.getKey(), kv));
|
||||
|
||||
Optional.ofNullable(left).ifPresent(l -> l.forEach(kv -> values.put(kv.getKey(), kv)));
|
||||
Optional.ofNullable(right).ifPresent(r -> r.forEach(kv -> values.putIfAbsent(kv.getKey(), kv)));
|
||||
|
||||
return new ArrayList<>(values.values());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue