Summary: | ClassCastException during build process | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Jim Thorpe <jthorpe> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 1.0 | ||
Target Milestone: | 2.0 M4 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Jim Thorpe
2002-03-12 14:03:34 EST
It looks like a duplicate of 6378. If you can isolate a test case, we could confirm this is fixed in the 2.0 stream. I am still working on trying to skinny down the failing source. (There's about 271 source files in this project I'm dealing with and I can't really send all this source to you). I will look at problem #6378 as well to see what it says. Thanks! Here is an isolated test case for the problem we solved in 6378. If you have a pattern of code close to this, then this is fixed in 2.0. public class A { public Object foo() { B b = new B() { protected Object bar() { return new B.C() {}; } }; return b; } } class B { class C { } } If you compile this code in 1.0, you'll get the same stacktrace than the one you provided. Did you try to compile your code in a 2.0 build? The failing source java file does have a pattern similar to what you describe. It's beaucoup inner classes. Is it possible to get this fix against the Eclipse 1.0 base ? No this is unlikely, since so many changes did occur in this area in between 1.0 and 2.0. Attempting to issue a patch would be hard, and likely causing some more troubles. You may want to change your source code for the short term (until you get a refreshed WSAD build based on Eclipse 2.0). The following would compile fine in 1.0: public class X { public Object foo() { B b = new B() { protected Object bar() { return new B.C(this) { }; } }; return b; } } class B { static class C { C(B b){ } } } I just wanted to document that I did try the Eclipse 2.0 build (20020214) and the problem is resolved. |