我有超类Foo。和一个类吧扩展它。Java泛型名称冲突,具有相同的擦除
public class Bar extends Foo
功能中富:
protected void saveAll(Collection<?> many)
功能在酒吧:
public void saveAll(Collection<MyClass> stuff) {
super.saveAll(stuff);
}
四处错误:
Name clash: The method saveAll(Collection<MyClass>) of type Bar has the same erasure as saveAll(Collection<?>) of type Foo but does not override it.
我在做什么错?
我冒昧地删除'hibernate'标签,因为它似乎与问题无关。 – 2012-08-13 12:14:08