Community
Participate
Working Groups
Build ID: M20070212-1330 Steps To Reproduce: 1. Create a class with the following code: public class Test { Object object; public void testMethod () throws Exception { Class obClass = object.getClass (); obClass.getMethod ("methodname", new Class[] { }); } } 2. There should be a "method belongs to raw type" warning on the line beginning "obClass.getMethod". Right click the warning in problems and choose quick fix. 3. One of the quick fix options should be "Add type parameters to 'Class'". Choose this and click OK. 4. The progress area says "Fixing" and the progress bar progresses half way across the dialog, but no further progress occurs. 5. The dialog cannot be cancelled, but may be closed via the window manager. More information: Note that the declaration of the field 'object' must be of type 'Object'. Any other type and the fix works fine.
Back to JDT/Core as in fact I do not really understand whether you want a new warning or does not like the current quick-fix behavior of the current warning on 'Class' telling that it should be parameterized...
As I see it, the "quick fix" option in question should change the line: Class obClass = object.getClass (); to read: Class<? extends Object> obClass = object.getClass (); But at present it does not, rather it appears to crash (leaving the progress bar halfway, etc.)
I cannot reproduce this problem neither in 3.3 version and 3.4M1... The warning is now correctly on Class and quick-fix works properly => close as WORKSFORME as I didn't find the original bug which fixed this issue
Verified for 3.4 M2 using build I20070917-0010.