Given the following hypothetical type hierarchy:
BaseElement
+ StringElement
+ ....
+ ....
+ BooleanElement
+ ....
+ ....
+ ...
I have a class interface in the form:
IBaseElementService createElementService(Class<? extends BaseElement> element);
IBooleanElementService createElementService(Class<? extends BooleanElement> element);
This compiles well in eclipse 3.4 but not anymore with eclipse 3.6, failing with the error:
Method ... has the same erasure createElementService(Class<T>) as another method in this type
I'm a little puzzled why this compiles under eclipse 3.4 since the type is removed by the java compiler. But anyways, is there an elegant way to change this without renaming the methods?
Thanks!
EDIT: As it was pointed out by multiple people, this seems to be an eclipse 3.4 - 3.5 bug. eclipse bug report (Thanks denis.solonenko for the link!)
If someone is interested about technical details of this bug, make sure to read the post from Paŭlo Ebermann, thx!