Community
Participate
Working Groups
when creating class which inherits from generics base class, such as HashMap, class is not generated correctly. resulting class throws compiler errors relating to generics. see example below: NOTE: first line should correctly be "public class LoggingMap<K, V> extends HashMap<K, V> {" ------------------------------------------ package com.xx.xx; import java.util.HashMap; import java.util.Map; /** * * * @author mike */ public class XyzMap extends HashMap { public XyzMap(int initialCapacity, float loadFactor) { super(initialCapacity, loadFactor); } public XyzMap(int initialCapacity) { super(initialCapacity); } public XyzMap() { super(); } public XyzMap(Map< ? extends K, ? extends V> m) { super(m); } }
oops.... here is correction.... [get rid of reference to 'LoggingMap'] NOTE: first line should correctly be "public class XyzMap<K, V> extends HashMap<K, V> {"
Testcase is properly rejected, as unable to resolve K or V. When adding type parameters <K,V> to XyzMap, the example compiles clear in latest. Closing as worksforme. Pls reopen if you still think something is wrong.