commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From emopers <...@git.apache.org>
Subject [GitHub] commons-validator pull request: Field does not synchronize iterati...
Date Mon, 28 Dec 2015 04:38:41 GMT
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 <emopers@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


Mime
View raw message