From c9789adf21452d1ea3829b7a85b039ab3ece6a77 Mon Sep 17 00:00:00 2001 From: Pierre Villard Date: Tue, 5 Sep 2017 23:31:54 +0200 Subject: [PATCH] NIFI-4351 - Fix for SiteToSiteProvenanceReportingTask when removing event type or component ID filters This closes #2127. --- .../nifi/reporting/SiteToSiteProvenanceReportingTask.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nifi-nar-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/SiteToSiteProvenanceReportingTask.java b/nifi-nar-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/SiteToSiteProvenanceReportingTask.java index 96777de281..e998debb1e 100644 --- a/nifi-nar-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/SiteToSiteProvenanceReportingTask.java +++ b/nifi-nar-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/SiteToSiteProvenanceReportingTask.java @@ -146,12 +146,16 @@ public class SiteToSiteProvenanceReportingTask extends AbstractSiteToSiteReporti getLogger().warn(type + " is not a correct event type, removed from the filtering."); } } + } else { + eventTypes.clear(); } // initialize component ID filtering final String[] componentIdList = StringUtils.stripAll(StringUtils.split(context.getProperty(FILTER_COMPONENT_ID).getValue(), ',')); if(componentIdList != null) { componentIds.addAll(Arrays.asList(componentIdList)); + } else { + componentIds.clear(); } // set a boolean whether filtering will be applied or not