Summary: | SIOOBE in StubUtility.hasConstantName during quick fix | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dani Megert <daniel_megert> |
Component: | Core | Assignee: | David Audel <david_audel> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | david_audel, martinae |
Version: | 3.2 | ||
Target Milestone: | 3.2 M6 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Dani Megert
2006-02-10 05:14:58 EST
The problem is the statement recovery: It creates a SimpleName with length 0. This is not valid and our code is not prepared for this. I also filed bug 127395 so this is detected earlier. In this case it seems unessesary to introduce a assignment statement. Just put the field in a ExpressionStatement. ExpressionStatement [60, 10] (recovered) EXPRESSION Assignment [60, 9] (recovered) LEFT_HAND_SIDE FieldAccess [60, 9] OPERATOR: '=' RIGHT_HAND_SIDE SimpleName [68, 1] (recovered) IDENTIFIER: '' If the added nodes are tagged as recovered, then this should still be supported. Maybe not ideal, or what you'd been expecting, but still legite. What about the case where you'd have: class B { void foo() { new Ä(). <quick fix here> } } Here an empty name is likely introduced again. Fixed and test updated (see bug 127395 comment 5) Verified using I20060328-0010 for 3.2M6 |