Harmony
  1. Harmony
  2. HARMONY-6498

[classlib][luni] java.util.LinkedHashMap doesn't implement Map<K, V> interface

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0M13
    • Fix Version/s: 6.0M2
    • Component/s: Classlib
    • Labels:
      None
    • Estimated Complexity:
      Moderate

      Description

      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)); }

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Kevin Zhou
            Reporter:
            Kevin Zhou
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development