You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Tamas Palfy (Jira)" <ji...@apache.org> on 2020/01/17 14:54:00 UTC

[jira] [Updated] (NIFI-7039) PublishJMS can fail with ConcurrentModificationException

     [ https://issues.apache.org/jira/browse/NIFI-7039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tamas Palfy updated NIFI-7039:
------------------------------
    Issue Type: Bug  (was: Improvement)

> 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
>            Priority: Major
>
> {{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)