Github user ijokarumawak commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2397#discussion_r161131114
--- Diff:
nifi-nar-bundles/nifi-extension-utils/nifi-reporting-utils/src/main/java/org/apache/nifi/reporting/util/provenance/ProvenanceEventConsumer.java
---
@@ -89,16 +94,26 @@ public void setComponentTypeRegex(final String
componentTypeRegex) {
}
}
- public void addTargetEventType(final ProvenanceEventType... types) {
- for (ProvenanceEventType type : types) {
- eventTypes.add(type);
+ public void setComponentTypeRegexExclude(final String
componentTypeRegex) {
+ if (!StringUtils.isBlank(componentTypeRegex)) {
+ this.componentTypeRegexExclude =
Pattern.compile(componentTypeRegex);
}
}
+ public void addTargetEventType(final ProvenanceEventType... types) {
+ eventTypes.addAll(Arrays.asList(types));
--- End diff --
Trivial, but is there any reason to not use `Collections.addAll` here, as
addTargetEventTypeExclude does?
---