Summary: | ClassCastException in HandleFactory.createElement(...) | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Christof Marti <christof_marti> |
Component: | Core | Assignee: | David Audel <david_audel> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.0 | ||
Target Milestone: | 3.1 M1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Christof Marti
2004-08-12 05:29:02 EDT
I can reproduce the stack trace with the following test case 1) create a new java project 2) set compiler compliance level to 1.5 (Properties>Java Compiler>Compliance and Classfiles>Compiler compliance level) 3) create X.java /** */ public enum X {; void foo() { int var; var = 0; } } 4) select "var" inside "var = 0;" The ClassCastException occurs Christof - Did you write similar Java code to cause the ClassCastException ? Yes, I experimented with an enum and members therein. I'm not sure if the exception was thrown when I did so, but it's plausible. HandleFactory#createElement(...) use an ASTVisitor but does not visit the EnumDeclaration node. Fixed ( visit() and endVisit() methods added). Test added (ResolveTest_1_5#test0015()) |