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] [Created] (NIFI-7039) PublishJMS can fail with
ConcurrentModificationException
Tamas Palfy created NIFI-7039:
---------------------------------
Summary: PublishJMS can fail with ConcurrentModificationException
Key: NIFI-7039
URL: https://issues.apache.org/jira/browse/NIFI-7039
Project: Apache NiFi
Issue Type: Improvement
Components: Extensions
Reporter: Tamas Palfy
{{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)