phrocker commented on a change in pull request #3853: NIFI-6822: Ensure that when we manage a Map of ID -> Count, that we p… URL: https://github.com/apache/nifi/pull/3853#discussion_r363415464
########## File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java ########## @@ -561,9 +563,8 @@ private void updateEventRepository(final Checkpoint checkpoint) { return first; } - final Map<String, Long> combined = new HashMap<>(); - combined.putAll(first); - combined.putAll(second); + final Map<String, Long> combined = new HashMap<>(first); + second.forEach((key, value) -> combined.merge(key, value, (v1, v2) -> v1 + v2)); Review comment: In retrospect after a nice refreshing break I'm not sure how I arrived that such a question. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services