harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-5799) [classlib][luni] ArrayList may introduce data corruption.
Date Tue, 29 Apr 2008 21:18:56 GMT

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

Tim Ellison resolved HARMONY-5799.
----------------------------------

    Resolution: Fixed

Thanks Sean.

Patch applied to LUNI module at repo revision r652138.

Please check it was applied as you expected.


> [classlib][luni] ArrayList may introduce data corruption.
> ---------------------------------------------------------
>
>                 Key: HARMONY-5799
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5799
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M6
>            Reporter: Sean Qiu
>            Assignee: Tim Ellison
>             Fix For: 5.0M6
>
>         Attachments: Harmony-5799.diff
>
>
> Harmony's ArrayList may cause data corruption.
> The testcase is list as following:
>         ArrayList list1 = new ArrayList();
>         ArrayList list2 = new ArrayList();
>         int location = 2;
>         
>         String[] strings = {"0","1","2","3","4","5","6"};
>         int[] integers = {0,1,2,3,4,5,6,7,8,9};        
>         for (int i = 0; i < 7; i++){
>             list1.add(strings[i]);
>         }
>         for (int i = 0; i < 10; i++){
>             list2.add(integers[i]);
>         }
>         list1.remove(location);
>         list1.addAll(location,list2);
>         
>          for(Object element: list1){
>              System.out.print(element+",");
>          }
> RI will print 
> "0", "1", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "3", "4", "5", "6", 
> While Harmony will print 
> "0", "1", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "1", "3", "4", "5", 
> The "6" is missing and "1" is duplicated.

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


Mime
View raw message