diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/metrics/EventSumValue.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/metrics/EventSumValue.java index 210f7ace82..a618812bf2 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/metrics/EventSumValue.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/metrics/EventSumValue.java @@ -180,7 +180,7 @@ public class EventSumValue { final String counterName = entry.getKey(); final Long counterValue = entry.getValue(); - counters.compute(counterName, (key, value) -> value == null ? counterValue : counterValue - value); + counters.compute(counterName, (key, value) -> value == null ? -counterValue : value - counterValue); } } }