You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2010/08/11 21:47:17 UTC

[jira] Resolved: (WICKET-2964) Improve the code that uses copy-list-on-iterate pattern

     [ https://issues.apache.org/jira/browse/WICKET-2964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-2964.
-------------------------------------

    Fix Version/s: 1.4.11
                   1.5-M2
       Resolution: Fixed

Fixed with r984554 in 1.4.x and r984557 in trunk

> Improve the code that uses copy-list-on-iterate pattern 
> --------------------------------------------------------
>
>                 Key: WICKET-2964
>                 URL: https://issues.apache.org/jira/browse/WICKET-2964
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket, wicket-auth-roles, wicket-datetime, wicket-examples, wicket-extensions, wicket-guice, wicket-jmx, wicket-portlet, wicket-quickstart, wicket-spring
>    Affects Versions: 1.4.9, 1.5-M1
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 1.4.11, 1.5-M2
>
>
> http://www.zeroturnaround.com/blog/copy-on-iterate-java-idiom-considered-broken/ describes a problem in ArrayList constructor in JDK1.5 and less that they debugged in a Wicket application.
> We can easy improve it by using the "simple solution":
> for (Iterator i = Arrays.asList(collection.toArray()).iterator(); i.hasNext();)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.