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/08/26 23:08:07 UTC
[jira] [Resolved] (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:all-tabpanel ]
Thomas Neidhart resolved COLLECTIONS-423.
-----------------------------------------
Resolution: Won't Fix
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira