harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sian January (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-6205) [classlib][luni] java.util.IdentityHashMap.clone() should return a shallow copy of this identity hash map
Date Thu, 14 May 2009 09:29:07 GMT

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

Sian January reassigned HARMONY-6205:
-------------------------------------

    Assignee: Sian January

> [classlib][luni] java.util.IdentityHashMap.clone() should return a shallow copy of this
identity hash map
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6205
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6205
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M9
>            Reporter: Kevin Zhou
>            Assignee: Sian January
>             Fix For: 5.0M10
>
>         Attachments: HARMONY-6205.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> The Java Spec specifies that java.util.IdentityHashMap.clone() should return a shallow
copy of this identity hash map. But in Harmony code, any changes to the original IdentityHashMap
may affect the cloned one. Given a test case [1], RI passes it but HARMONY fails since the
hashMap and cloned map share the same data.
> [1] Test Case:
> public void test_clone() {
>     IdentityHashMap hashMap = new IdentityHashMap();
>     Object cloneHashMap = hashMap.clone();
>     hashMap.put("key", "value");
>     assertEquals("value", hashMap.get("key"));
>     assertNull(((IdentityHashMap) cloneHashMap).get("key"));
> } 

-- 
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