You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2012/07/25 21:00:47 UTC

[jira] [Commented] (COLLECTIONS-423) FastArrayList.toString() fails to check for reference to itself

    [ https://issues.apache.org/jira/browse/COLLECTIONS-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422509#comment-13422509 ] 

Thomas Neidhart commented on COLLECTIONS-423:
---------------------------------------------

Hi Michael,

thanks for your bug report. It is unlikely that there will be a 3.2.2 release and the FastArrayList has been dropped for future major releases (currently preparing release 4.0) in favor of CopyOnWriteArrayList which is available from the standard JDK.

Thomas
                
> FastArrayList.toString() fails to check for reference to itself
> ---------------------------------------------------------------
>
>                 Key: COLLECTIONS-423
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-423
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: List
>    Affects Versions: 3.2.1
>         Environment: All environments
>            Reporter: Michael Pradel
>
> FastArrayList.toString() throws a StackOverflowError when the list contains itself, because toString() is called recursively. In contrast, ArrayList checks for this case and deals with it appropriately. E.g.:
>   ArrayList l = new FastArrayList();
>   l.add(l);
>   l.toString(); // StackOverflowError
> But:
>   ArrayList l = new ArrayList();
>   l.add(l);
>   l.toString(); // OK
> 	
> To be compatible with its superclass, FastArrayList should also consider this special case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira