Október 5, 2010

SpringSource Tool Suite 2.5 – Error: Method has the same erasure

Java kód, ktorý bol skompilovateľný pod SpringSource Tool Suite 2.3, už nemusí byť skompilovateľný pod 2.5.

Typická chyba: Method has the same erasure.

Problém spôsobí kód, kde sa využíva preťaženie ako:

getById(List <MyClass>, String name)
getById(List <MyClassDto>, String name)

Riešenie: opraviť kód alebo použiť STS 2.3.2.