NIFI-4351 - Fix for SiteToSiteProvenanceReportingTask when removing event type or component ID filters

This closes #2127.
This commit is contained in:
Pierre Villard 2017-09-05 23:31:54 +02:00 committed by Mark Payne
parent 9ebf2cfaf1
commit c9789adf21
1 changed files with 4 additions and 0 deletions

View File

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