mark-bathori commented on code in PR #6783:
URL: https://github.com/apache/nifi/pull/6783#discussion_r1081178611


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/MonitorMemory.java:
##########
@@ -218,7 +218,11 @@ public void onTrigger(final ReportingContext context) {
         }
 
         final double percentageUsed = (double) usage.getUsed() / (double) 
usage.getMax() * 100D;
-        if (bean.isCollectionUsageThresholdSupported() && 
bean.isCollectionUsageThresholdExceeded()) {
+        final String percentageUsageThreshold = threshold.substring(0, 
threshold.length() - 1);

Review Comment:
   @tpalfy thanks for noticing this issue, I forgot to handle scenarios where 
memory size is provided as threshold instead of percentage.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to