You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2009/04/16 12:06:14 UTC

[jira] Resolved: (HARMONY-6145) [classlib][luni] java.lang.LinkedList.addAll(Collection collection) runs into endless loop

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

Tim Ellison resolved HARMONY-6145.
----------------------------------

    Resolution: Fixed

Thank you Kevin.

I have modified your patch so that the common case, of adding a collection that is not the same as the receiver, does not copy into a new Array.  I think it is better to save time and space for this most common case.

Please see modified patch applied to LUNI module at repo revision r765552 and check it solves the problem for you.


> [classlib][luni] java.lang.LinkedList.addAll(Collection<? extends E> collection) runs into endless loop
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6145
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6145
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Kevin Zhou
>            Assignee: Tim Ellison
>            Priority: Critical
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6145.diff
>
>
> Given a test case [1], RI successfully passes it while HY runs into endless loop.
> [1] Test Case:
> public void test_addAll_Self_Ljava_util_Collection() {
>     LinkedList linkedList = new LinkedList();
>     linkedList.addLast(1);
>     assertEquals(1, linkedList.size());
>     assertTrue(linkedList.addAll(linkedList));
>     assertEquals(2, linkedList.size());
> }

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