You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by emopers <gi...@git.apache.org> on 2015/12/28 05:38:41 UTC

[GitHub] commons-validator pull request: Field does not synchronize iterati...

GitHub user emopers opened a pull request:

    https://github.com/apache/commons-validator/pull/4

    Field does not synchronize iteration on synchronized list

    In Field.java:908, the synchronized list `dependencyList` 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.

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

    $ git pull https://github.com/emopers/commons-validator rand_coll_71

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

    https://github.com/apache/commons-validator/pull/4.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 #4
    
----
commit 38e284536e31fff856809878222817ddc7879536
Author: emopers <em...@gmail.com>
Date:   2015-12-27T10:26:45Z

    Added synchronized when iterating over synchronizedList as per Java specification

----


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


[GitHub] commons-validator pull request #4: Field does not synchronize iteration on s...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/commons-validator/pull/4


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org