[
https://issues.apache.org/jira/browse/NIFI-7039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17018956#comment-17018956
]
ASF subversion and git services commented on NIFI-7039:
-------------------------------------------------------
Commit b35ad7cd2089c20f34692fff51f39488df0feaf9 in nifi's branch
refs/heads/master from Tamas Palfy
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=b35ad7c ]
NIFI-7039 - This closes #3995. Fix: PublishJMS outgoing flowfile attribute
cleanup could lead to ConcurrentModificationException
Signed-off-by: Joe Witt <[email protected]>
> PublishJMS can fail with ConcurrentModificationException
> --------------------------------------------------------
>
> Key: NIFI-7039
> URL: https://issues.apache.org/jira/browse/NIFI-7039
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Tamas Palfy
> Assignee: Tamas Palfy
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {{PublishJMS}} tries to cleanup flowfile attributes before sending them over
> JMS.
> However it does so via iterating over the entries of a Map and removing
> unwanted ones - within the same iteration cycle:
> {code:java}
> for (final Map.Entry<String,String> entry :
> attributesToSend.entrySet()) {
> if (!entry.getKey().endsWith(".type")){
> if (entry.getKey().contains("-") ||
> entry.getKey().contains(".")) {
> attributesToSend.remove(entry.getKey());
> }
> }
> }
> {code}
> This is undetermenistic and should not be done as can lead to
> ConcurrentModificationException.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)