activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From emopers <...@git.apache.org>
Subject [GitHub] activemq pull request: TransportConnection does not synchronize it...
Date Tue, 24 Nov 2015 11:59:25 GMT
GitHub user emopers opened a pull request:

    https://github.com/apache/activemq/pull/160

    TransportConnection does not synchronize iteration on synchronized list

    In TransportConnection.java:861, the synchronized list returned by cs.getTempDestinations()
is iterated
    in an unsynchronized manner, but according to the [Oracle Java 7 API specification](http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList(java.util.List)),
    this is not thread-safe and can lead to non-deterministic behavior. This pull request
adds a fix by synchronizing the iteration on the list returned by cs.getTempDestinations().


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/emopers/activemq SynchronizedCollection_140_422

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq/pull/160.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 #160
    
----
commit 948e9809caf238991c5216567e135b080f81676d
Author: emopers <emopers@gmail.com>
Date:   2015-11-24T11:46:37Z

     Added synchronized when iterating over SynchronizedList as per Java specifications

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message