Bug 74936 - [1.5] Compiler does not warn for missing implementation of Map.putAll abstract method
Summary: [1.5] Compiler does not warn for missing implementation of Map.putAll abstrac...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-24 06:05 EDT by Frederic Fusier CLA
Modified: 2004-12-14 14:53 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2004-09-24 06:05:19 EDT
Using following test case, Javac 1.5.0-beta2 complains "GenericMap.java:7:
test.GenericMap is not abstract and does not override abstract method
putAll(java.util.Map<? extends java.lang.String,? extends V>) in java.util.Map
public class GenericMap<V> implements Map<String, V> {"  while Eclipse accepts
the class.


package test;

import java.util.Collection;
import java.util.Map;
import java.util.Set;

public class GenericMap<V> implements Map<String, V> {
   private Map<String, V> backingMap;
   
   public int size() { return 0; }

   public boolean isEmpty() { return false; }

   public boolean containsKey(Object key) { return false; }

   public boolean containsValue(Object value) { return false; }

   public V get(Object key) { return null; }

   public V put(String key, V value) { return null; }

   public V remove(Object key) { return null; }

   public void clear() { }

   public Set<String> keySet() { return null; }

   public Collection<V> values() { return null; }


   public void putAll(Map<String, ? extends V> t) { }

  
   public Set<Map.Entry<String, V>> entrySet() {
      return this.backingMap.entrySet();
   }
}
Comment 1 Frederic Fusier CLA 2004-09-24 06:05:43 EDT
See bug 72644
Comment 2 Kent Johnson CLA 2004-11-16 15:37:09 EST
See GenericType test 298
Comment 3 Olivier Thomann CLA 2004-12-14 14:53:23 EST
Verified in 200412140800