[
https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16144345#comment-16144345
]
Benjamin Wood commented on NIFI-4326:
-------------------------------------
Using grepcode as a reference, should be able to substitute "getRecipients"
with "getHeaderAsInternetAddresses" and pass it a "non-strict" address
parameter. Because getRecipients just calls the other function under the hood.
Will do some rewrites of the processor and see if the exception is ignored in
the "non-strict" parsing of mail addresses.
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.geronimo.specs/geronimo-javamail_1.4_spec/1.1/javax/mail/internet/MimeMessage.java#MimeMessage.getHeaderAsInternetAddresses%28java.lang.String%2Cboolean%29
> ExtractEmailHeaders.java unhandled Exceptions
> ---------------------------------------------
>
> Key: NIFI-4326
> URL: https://issues.apache.org/jira/browse/NIFI-4326
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.3.0
> Environment: jdk 1.8.0_121-b13
> Reporter: Benjamin Wood
> Priority: Minor
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The ExtractEmailHeaders processor throws a NullPointerException if there is
> no TO, CC, and BCC recipients.
> If there are no recipients "originalMessage.getAllRecipients()" returns NULL,
> and not a 0 length array.
> If an address is empty (<> or " ") then getRecipients() will throw an "Empty
> Address" AddressException
> It's possible this is only an issue with Oracle Java.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)