Summary: | Compiler error using Annotations | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Peter Shipton <Peter_Shipton> | ||||||||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||||
Severity: | normal | ||||||||||||||
Priority: | P3 | CC: | daniel_megert | ||||||||||||
Version: | 3.1 | ||||||||||||||
Target Milestone: | 3.1 RC3 | ||||||||||||||
Hardware: | PC | ||||||||||||||
OS: | Windows XP | ||||||||||||||
Whiteboard: | |||||||||||||||
Attachments: |
|
Description
Peter Shipton
2005-06-10 10:53:46 EDT
Created attachment 22803 [details]
Annotation test suite which demonstrates a compiler problem in Eclipse
Created attachment 22805 [details]
Picture showing the problem
reproduced. Testcase can be reduced to changing the following source file (after a full build): package com.ibm.oti.annotation; public class AnnotationTest2 { private Class<?> testClass = AnnotationTestClass.class; } We are getting a ClassFormatException trying to open AnnotationTestClass.class Any one of the 4 ValueAnnotations is causing the problem, here is the one for class: @ValueAnnotation (value="ValueAnnotation",booleanValue=true,charValue='m',byteValue=- 123,shortValue=-12345, intValue=-1234567890,floatValue=-12345.6789f,doubleValue=- 12345.6789,longValue=-1234567890123456789l, stringValue="valueString",enumValue=EnumClass.Value3,classValue=AnnotationTestC lass.class, annotationValue=@ClassAnnotation(value="ClassAnnotation"),booleanArrayValue= {false,true},charArrayValue={'m','q'}, byteArrayValue={-123,123},shortArrayValue={-12345,12345},intArrayValue={- 1234567890,1234567890}, floatArrayValue={-12345.6789f,12345.6789f},doubleArrayValue={- 12345.6789,12345.6789}, longArrayValue={-1234567890123456789l,1234567890123456789l},stringArrayValue= {"valueString", "stringValue"}, enumArrayValue={EnumClass.Value2,EnumClass.Value1},classArrayValue= {EnumClass.class, AnnotationTestClass.class}, annotationArrayValue={@ClassAnnotation(value="ClassAnnotation1"), @ClassAnnotation(value="ClassAnnotation2")}) I'll investigate it. Created attachment 22840 [details]
Apply on HEAD
Created attachment 22841 [details]
Regression test
Apply on HEAD of compiler tests.
+1 for RC3 Created attachment 22869 [details]
New patch
The code is clearer for the parameter annotation initialization.
Dani - pls cast a vote for this one. Another exception during compile. +1 for 3.1 RC3. Fixed and released in HEAD. Regression test added in org.eclipse.jdt.core.tests.compiler.regression.AnnotationTest.test166. Verified using build N20050616-0010 + JDT Core HEAD. |