Github user alopresto commented on a diff in the pull request: https://github.com/apache/nifi/pull/328#discussion_r67210183 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/MonitorMemory.java --- @@ -154,30 +164,21 @@ public void onConfigured(final ConfigurationContext config) throws Initializatio } final List<MemoryPoolMXBean> memoryPoolBeans = ManagementFactory.getMemoryPoolMXBeans(); - for (final MemoryPoolMXBean bean : memoryPoolBeans) { - final String memoryPoolName = bean.getName(); + for (int i = 0; i < memoryPoolBeans.size() && monitoredBean == null; i++) { + MemoryPoolMXBean memoryPoolBean = memoryPoolBeans.get(i); + String memoryPoolName = memoryPoolBean.getName(); if (desiredMemoryPoolName.equals(memoryPoolName)) { - monitoredBean = bean; - if (DATA_SIZE_PATTERN.matcher(thresholdValue).matches()) { - final long bytes = DataUnit.parseDataSize(thresholdValue, DataUnit.B).longValue(); --- End diff -- Sorry, meant to put it on line 178 below. Same code is still present.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---