Classfile assumes that all methods have different signatures. When two methods differ only by their return type, one ends up hiding the other. It should at least issue a warning when such collisions occur.
Java calls these "bridge methods" and they are special synthetic methods to deal with certain aspects of generics and methods with covariant return types.
This is mainly caused by "bridge" methods that the compiler generates automatically to deal with type-safety issues. A warning is not enough. The software must handle these methods correctly. It means that indexing solely by signature is not enough.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Java calls these "bridge methods" and they are special synthetic methods to deal with certain aspects of generics and methods with covariant return types.
http://www.coderanch.com/t/417883/Programmer-Certification-SCJP/certification/What-are-bridge-methods-Java
This is mainly caused by "bridge" methods that the compiler generates automatically to deal with type-safety issues. A warning is not enough. The software must handle these methods correctly. It means that indexing solely by signature is not enough.