I have the following test class that uses generics to overload a method. It works when compiled with javac and fails to compile in Eclipse Helios. My java version is 1.6.0_2
After some research, I have the answer:
The code, as it is specified above should NOT compile. ArrayList and ArrayList, at runtime is still ArrayList. But your code is not working because the returning type. If you set the same returning types for both methods, javac won't compile that...
I read that there is a bug in Java 1.6 (that is already fixed in Java 1.7) about this error. Is all about returning types... so, you will need to change the signature of your methods.
There is the bug 6182950 in Oracle's Bug Database.