Summary: | ClassCastException: Initializer cannot be cast to IType when resolving binding | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Rüdiger Lincke <rudiger.lincke> | ||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | eric_jodet, jerome_lanneluc, maxime_daniel, Olivier_Thomann, philippe_mulet, rudiger.lincke | ||||
Version: | 3.3.1 | Flags: | philippe_mulet:
pmc_approved+
|
||||
Target Milestone: | 3.3.2 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Rüdiger Lincke
2007-10-30 11:00:07 EDT
Fix for bug 129584 fixed this problem. See bug 149853 for the same stack trace *** This bug has been marked as a duplicate of bug 129584 *** Are you sure that you are using 3.3.1? (In reply to comment #2) > Are you sure that you are using 3.3.1? Well, Eclipse reports in the About Eclipse SDK Dialog Version: 3.3.1.1 Build id: M20071023-1652 (In reply to comment #1) > Fix for bug 129584 fixed this problem. See bug 149853 for the same stack trace > *** This bug has been marked as a duplicate of bug 129584 *** Hello again. Thank you for your fast feedback. :-) I don't think this is a duplicated bug. I was reading the bug reports 129584 and 149853. For 129584, I do not see the relation. 149853 seems somewhat related, but the exception comes from a different line number for a different type. The described problem is fixed in my version of Eclipse. I tested the situation also under Eclipse 3.2.2 (M20070212-1330). There bug 149853 does still exist, and my bug as well. I used the Eclipse AST View 1.1.3 in this case. But the problem described by me still exists, and now I know it was already there in 3.2.2. Could anybody reproduce it? Is it ok, that I marked this bug as "Reopen bug"? (In reply to comment #4) > I don't think this is a duplicated bug. I was reading the bug reports 129584 > and 149853. This is why I asked what build you are using. If you got the problem with a build post 3.3M1, then this cannot be a duplicate of the bug 129584. Clear target milestone. (In reply to comment #6) > Clear target milestone. Thank you! (In reply to comment #4) > I don't think this is a duplicated bug. I was reading the bug reports 129584 > and 149853. Sorry I went to fast. I tested with the latest 3.4 build and could not reproduce. Since the trace in bug 149853 looked similar (even though for a different type) I assumed that was the same problem. > Could anybody reproduce it? I could reproduce in the 3.3 maintenance stream. Not in HEAD (the 3.4 development stream). I will try to find out what change made it working in 3.4. > Is it ok, that I marked this bug as "Reopen bug"? Yes, you did the right thing. After investigation, the fix for bug 167357 fixed the problem in HEAD. I'm not sure if we can backport this fix to R3_3_maintenance. We might want to add a workaround instead. Created attachment 83977 [details] Proposed workaround and regression test Note with this workaround, the returned element doesn't exist, but at least it doesn't throw a ClassCastException. The real fix would be to backport the fix for bug 167357 which I think is too risky. Asking PMC approval to add this workaround for 3.3.2. This workaround is safe and it avoids the ClassCastException. +1 for 3.3.2 Workaround and test released for 3.3.2 Jérôme, I would suggest that you also release ASTModelBridgeTest#testMethod11 in HEAD. Good suggestion. ASTModelBridgeTest#testMethod11 is now released in HEAD. Note that the expected Java element is different from the one in R3_3_maintenance because of bug 167357 that is fixed in HEAD. The test is here and runs OK. Verified for 3.4 M4 using build I20071211-0010. Verified for 3.3.2 using M20080123-0800 build |