Summary: | IAE in Signature.createCharArrayTypeSignature | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dani Megert <daniel_megert> | ||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P3 | ||||||
Version: | 3.1 | ||||||
Target Milestone: | 3.2 M5 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Dani Megert
2006-01-20 04:08:06 EST
Created attachment 33354 [details]
Proposed patch
The problem occurs when trying to retrieve the parameter types for a declaring type of a class inside an anonymous class.
See the code in org.eclipse.ui.internal.PerspectiveSwitcher#hookDragSupport()
Look at the creation of the class PerspectiveDropTarget. When trying to map the constructor, we try to find the type name of the enclosing type. And we retrieve an empty name.
This is why we get the IllegalArgumentException.
Jérôme, Could you please review the patch? It is highly possible that there is a better way to retrieve the required type name. I also noticed that the parameter names are one item shorter than the corresponding type names. Is this desired? To reproduce you need to switch to the Java Browsing Perspective before you do the step 2 in comment 0. Let me know if you need any help. Ping. This is quite nasty: when opening a type that runs into this I get several error dialogs until I can edit the file. Patch is good except that there is no need for the null check on the class file since it is a binary type. Released it (without the null check) and added regression test AttachSourceTests#testInnerClass9() Verified for 3.2 M5 using build I20060214-0010. |