Summary: | [1.5][compiler] Failed to compile Jaxb 2.0 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Hanson Char <hanson.char> | ||||
Component: | Core | Assignee: | Kent Johnson <kent_johnson> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P3 | CC: | dinko.tenev, eric | ||||
Version: | 3.2 | ||||||
Target Milestone: | 3.2 M6 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Hanson Char
2006-01-31 19:14:32 EST
Are you sure that your compiler settings are set to 1.5? Yes, I am sure. The JDK Compilance level is all set to 5.0. As mentioned earlier, you can easily check out the cvs tree from jaxb2.0 and see all the generics problems in Eclipse. Note not all generics classes have problems, but significantly so in many classes in jaxb 2.0. Also, I tried it in Eclipse 3.1.1, 3.1.2 and 3.2M4. All appears to have the same problems. I will request access to this source code. Further investigation (by fixing the build path) seems to reduce the number of errors to two specific errors related to Generics using Eclipse 3.2M4: Error The return type is incompatible with RuntimeClassInfo.getLocatorField() RuntimeClassInfoImpl.java JAXB 2.x/runtime/src/com/sun/xml/bind/v2/model/impl line 194 Error The return type is incompatible with RuntimeLeafInfo.getTransducer() RuntimeEnumLeafInfoImpl.java JAXB 2.x/runtime/src/com/sun/xml/bind/v2/model/impl line 31 Created attachment 34025 [details]
Test case
Compile this test case using Eclipse compiler.
javac reports two warnings: X.java:7: warning: bar() in X implements <V>bar() in I; return type requires unchecked conversion found : C<T> required: C<V> public C<T> bar() { ^ X.java:3: warning: foo() in X implements <T>foo() in I; return type requires unchecked conversion found : A<?,J> required: A<T,J> public A<?,J> foo() { ^ 2 warnings We report: ---------- 1. ERROR in d:\tests_sources\X.java (at line 3) public A<?,J> foo() { ^^^^^ The return type is incompatible with I.foo() ---------- 2. ERROR in d:\tests_sources\X.java (at line 7) public C<T> bar() { ^^^^^ The return type is incompatible with I.bar() ---------- 2 problems (2 errors) This should correspond to the two failures reported in comment 5. I have many more errors for unresolved types, but I won't focus on them since they might be related to wrong build paths. *** Bug 106880 has been marked as a duplicate of this bug. *** Fixed return type conversion warning cases. Added MethodVerify test81. Please let us know if you have other 5.0 compiler problems with your project. *** Bug 105339 has been marked as a duplicate of this bug. *** Verified for 3.2 M6 using warm-up build I20060327-0010. |