Summary: | [1.5] CCE in VariableBinding.getJavaElement() | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Tobias Widmer <tobias_widmer> | ||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | ||||||
Version: | 3.1 | ||||||
Target Milestone: | 3.1 M4 | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Tobias Widmer
2004-12-02 10:39:29 EST
Created attachment 16303 [details]
stack trace
The parent of a VariableDeclaration can be something else than a VariableDeclarationStatement. It can be a EnhancedForStatement, a CatchClause or a MethodDeclaration. So the CCE can occur in different cases. Jérôme, I let you fix it. Test case is ready in ASTConverter15Test.test0090. You simply need to enable the test. In fact I wonder why you need the parent. The position (declaration source start and declaration source end) are the positions of the Variable declaration. The name positions are the position of the inner Name node, aren't they? Fixed VariableBinding#getJavaElement() to handle the case of a SingleVariableDeclaration. (Olivier you can see ASTModelBridgeTests#testLocalVariable2() for the case where the parent is a VariableDeclarationStatement). Moved regression test to ASTModelBridgeTests#testLocalVariable3() (and simplified it). Verified for 3.1 M4 using build I200412142000. |