[ https://issues.apache.org/jira/browse/HARMONY-6419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Catherine Hope updated HARMONY-6419: ------------------------------------ Attachment: 6419.patch A simple fix is to store a reference to the IdentityHashMap in the IdentityHashMapEntry and override the MapEntry.setValue method to additionally put the new value in the hash map. > [classlib][luni] Changes to IdentityHashMap entrySet doesn't reflect underlying map > ----------------------------------------------------------------------------------- > > Key: HARMONY-6419 > URL: https://issues.apache.org/jira/browse/HARMONY-6419 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M12 > Reporter: Tim Ellison > Attachments: 6419.patch > > > The following test fails on Harmony. > (With thanks to http://blogs.oracle.com/charlesLamb/2010/01/harmonydavlik_identityhashmap.html) > import java.util.IdentityHashMap; > import java.util.Set; > import java.util.Map.Entry; > import junit.framework.TestCase; > public class IHMTest extends TestCase { > public void testEntrySet() { > IdentityHashMap ihm = new IdentityHashMap(); > String key = "key"; > String value = "value"; > ihm.put(key, value); > Set> set = ihm.entrySet(); > assertEquals(1, set.size()); > Entry entry = set.iterator().next(); > String newValue = "newvalue"; > entry.setValue(newValue); > assertSame(newValue, ihm.get(key)); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.