[
https://issues.apache.org/jira/browse/NIFI-5252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16509269#comment-16509269
]
ASF GitHub Bot commented on NIFI-5252:
--------------------------------------
Github user pvillard31 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2787#discussion_r194632391
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutEmail.java
---
@@ -319,6 +330,15 @@ public void onTrigger(final ProcessContext context,
final ProcessSession session
message.setRecipients(RecipientType.CC,
toInetAddresses(context, flowFile, CC));
message.setRecipients(RecipientType.BCC,
toInetAddresses(context, flowFile, BCC));
+ final String attributeNameRegex =
context.getProperty(ATTRIBUTE_NAME_REGEX).getValue();
+ final Pattern attributeNamePattern = attributeNameRegex ==
null ? null : Pattern.compile(attributeNameRegex);
--- End diff --
Could we move the compile outside the onTrigger call? I think it's better
to make this call when the processor is scheduled.
> Allow arbitrary headers in PutEmail processor
> ---------------------------------------------
>
> Key: NIFI-5252
> URL: https://issues.apache.org/jira/browse/NIFI-5252
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Dustin Rodrigues
> Priority: Minor
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)