[
https://issues.apache.org/jira/browse/ARIES-1887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16762860#comment-16762860
]
ASF GitHub Bot commented on ARIES-1887:
---------------------------------------
GitHub user nicolas-dutertry opened a pull request:
https://github.com/apache/aries/pull/95
[ARIES-1887] ComponentTxData in transaction-blueprint was not thread safe
I have replaced HashMap with ConcurrentHashMap.
Because ConcurrentHashMap does not support null values, I have used
Optional<TransactionalAnnotationAttributes> as value type.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nicolas-dutertry/aries ARIES-1887
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/aries/pull/95.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #95
----
commit 49968551d414fb8a31da5c230b8a3bd4d9788a36
Author: Nicolas Dutertry <nicolas@...>
Date: 2019-02-07T16:53:49Z
[ARIES-1887] ComponentTxData in transaction-blueprint was not thread safe
----
> org.apache.aries.transaction.blueprint is not thread safe
> ---------------------------------------------------------
>
> Key: ARIES-1887
> URL: https://issues.apache.org/jira/browse/ARIES-1887
> Project: Aries
> Issue Type: Bug
> Components: Transaction
> Affects Versions: transaction-blueprint-2.2.0
> Reporter: Nicolas Dutertry
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: transaction-blueprint-2.3.0
>
>
> The class ComponentTxData in org.apache.aries.transaction.blueprint uses a
> HashMap
> {code:java}
> private Map<Method, TransactionalAnnotationAttributes> txMap = new
> HashMap<Method, TransactionalAnnotationAttributes>();{code}
> This is very dangerous because txMap can be modified and accessed after
> initialization.
> It should be replaced with a ConcurrentHashMap.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)