Community
Participate
Working Groups
Using: Version: 3.1.0 Build id: 200412162000 I'm trying to build an Iterator<T> using 1.5 generics, but the compiler seems to think the return type "E" from the Iterator interface is a real type. Example: import java.util.Iterator; public class MyStringIterator implements Iterator<String> { public boolean hasNext() { return false; } public String next() { return null; } public void remove() {} } Gives two errors: + The type MyStringIterator must implement the inherited abstract method Iterator.next() + E cannot be resolved to a type I also get this from the mouseover on "String next()": Type safety: The return type String of the method next() of type MyStringIterator needs unchecked conversion to conform to the return type E of inherited method So far, rest of the generics stuff has worked fine.
Cannot reproduce any longer in latest. Code compiles clear now. Added regression test: GenericTypeTest#test443.
Works for me