I have tho following Interface:
This Interface is implemented by the following class:
Now the compiler complaints about "Name clash: The method handleResult(List<MyDomainObject> ) of type MyObjects has the same erasure as handleResult(List<? extends AbstractDomainObject> ) of type MyHandler but does not override it".
MyDomainObject extends AbstractDomainObject, therefore I thought it's a correct use of generics. If I omit the generic in the implementing class the compiler only warns "References to generic type List<E> should be parameterized". What's the problem???
[ December 04, 2008: Message edited by: R. Heydenreich ]
I think you have some other method named handleResult(...) in MyHandler or Job
interface where the type erasure of this method signature comes same instead
of overriding the method.
No, this is the only one method I have in this interface.
Does MyObjects class overrides handleResult(...) method? I see gotcha there.
Yes, it overrides the method.
You may want to use generics on the entire interface: