Community
Participate
Working Groups
Build Identifier: 20100917-0705 For generic types (e.g. Foo<T>) the "step into selection" functionality of the Java debugger does not work. Reproducible: Always Steps to Reproduce: 1. Example code: public class Foo<T> { private void sayHello() { System.out.println("Hello!"); } public static void main(String[] args) { new Foo<String>().sayHello(); } } 2. Place a breakpoint in the main method 3. When the breakpoint hits, put the cursor on the call tio sayHello and choose step into selection from the context menu. The bug is that this does *not* steps into the sayHello method. Note that this functionality works fine for the non-generic case.
Created attachment 216339 [details] Stripping the parameter information Stripping the parameter information for a generic class during comparison
Submitting a patch with a relatively simple fix. Basically ignoring the parametrized information for a class name( as it is type erasure). Let me know if this is the right place to fix this, otherwise I will try to find another fix. I think this bug is applicable to all platforms.
Thanks for the patch Samrat, I will look at it once 4.3 starts
Created attachment 218303 [details] updated patch I updated the original patch with the following: 1. added some regression tests 2. We did not need the extra checks for the end '>', once we take off the sub-type names the only remaining parts of the type name are name + erasure so we can simply take the substring up to the '<' (if one exists). 3. Also we shouldn't be assigning substring values to the method parameter.
pushed second patch to: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=814411603572558cdc6b691ca6b4eab515c8f51e