You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2010/04/15 10:06:49 UTC
[jira] Updated: (HARMONY-6498) [classlib][luni]
java.util.LinkedHashMap doesn't implement Map interface
[ https://issues.apache.org/jira/browse/HARMONY-6498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou updated HARMONY-6498:
--------------------------------
Attachment: HARMONY-6498.diff
Would you please help to review this patch?
> [classlib][luni] java.util.LinkedHashMap doesn't implement Map<K, V> interface
> ------------------------------------------------------------------------------
>
> Key: HARMONY-6498
> URL: https://issues.apache.org/jira/browse/HARMONY-6498
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M13
> Reporter: Kevin Zhou
> Fix For: 6.0M2
>
> Attachments: HARMONY-6498.diff
>
>
> According to Java Spec, java.util.LinkedHashMap should extend HashMap class and implement Map interface. But as to our implementation, HY seems doesn't implement the Map interface. Given a simple test case [1], HY fails while RI passes.
> [1] TestCase:
> public void test_getInterfaces() {
> Class<?>[] interfaces = HashMap.class.getInterfaces();
> assertEquals(3, interfaces.length);
> List<Class<?>> interfaceList = Arrays.asList(interfaces);
> assertTrue(interfaceList.contains(Map.class));
> assertTrue(interfaceList.contains(Cloneable.class));
> assertTrue(interfaceList.contains(Serializable.class));
> interfaces = LinkedHashMap.class.getInterfaces();
> assertEquals(1, interfaces.length);
> interfaceList = Arrays.asList(interfaces);
> assertTrue(interfaceList.contains(Map.class));
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira