TC instrumented Hashtable breaks non-fail-fast behavior for keys() and values() 
views
-------------------------------------------------------------------------------------

                 Key: CDV-752
                 URL: https://jira.terracotta.org/jira//browse/CDV-752
             Project: Community Development
          Issue Type: Bug
          Components: Byte Code Transform
    Affects Versions: 2.6-stable4
            Reporter: Tim Eck
            Assignee: Issue Review Board


Using a plain vanilla Hashtable (ie. no dso-boot jar), one can freely create a 
keys() or values() view and safely traverse it while the underlying map is 
being modified. 

I haven't actually tried it yet, but some code like this will throw 
ConcurrentModificationException when a TC instrumented Hashtable is used, 
whereas the stock Hashtable will run fine:

        Hashtable ht = new Hashtable();
        ht.put("tim", "eck");
        Enumeration e = ht.keys();
        ht.put("bob", "bob");
        while (e.hasMoreElements()) {
            System.err.println(e.nextElement());
        }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to