harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6498) [classlib][luni] java.util.LinkedHashMap doesn't implement Map<K, V> interface
Date Thu, 15 Apr 2010 07:40:49 GMT
[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


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

        

Mime
View raw message