Summary: | Enum-valued annotation element handles non-enum constant badly | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Justin T. Sampson <justin> | ||||||||||||||||||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||||||||||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||||||||||||||
Severity: | major | ||||||||||||||||||||||||
Priority: | P3 | CC: | jfaerman, philippe_mulet | ||||||||||||||||||||||
Version: | 3.1.1 | ||||||||||||||||||||||||
Target Milestone: | 3.2.2 | ||||||||||||||||||||||||
Hardware: | PC | ||||||||||||||||||||||||
OS: | Windows XP | ||||||||||||||||||||||||
Whiteboard: | |||||||||||||||||||||||||
Attachments: |
|
Description
Justin T. Sampson
2006-07-05 17:39:46 EDT
Created attachment 45920 [details]
Proposed fix
This fixes the following problem + improved the error message to include (enum) + fix the bug for the array initializer that can contain the null literal.
Created attachment 45921 [details]
Regression tests
Philippe, Could you please review it? I can adapt it for 3.2.1 if needed by changing back the error message. +1 for 3.2.2 *** Bug 156891 has been marked as a duplicate of this bug. *** Created attachment 49948 [details]
Proposed fix
More complete fix.
This also covers the name reference that refers to an array initializer with a better error message.
Philippe,
Let me know what you think. I can take care of releasing it.
Created attachment 49974 [details]
Better patch
I believe this patch is more consistent with other error messages.
Created attachment 49975 [details]
Updated regression tests
Fix looks good, however for 3.2 maintenance no new pb ID can be introduced. As to make it internal, or reuse an existing error msg (suboptimal, but no API change). This is the patch for 3.3 stream (HEAD). I'll prepare another one for 3.2 maintenance. Fixed and released in HEAD. Regression tests added in org.eclipse.jdt.core.tests.compiler.regression.AnnotationTest#test208/213. Released for 3.3M2. Created attachment 50002 [details]
Patch for 3.2 maintenance
Created attachment 50003 [details]
Regression tests for 3.2 maintenance branch
Created attachment 50036 [details]
Regression tests for 3.2 maintenance branch
Missed one test case in org.eclipse.jdt.core.tests.dom.ASTConverter15Test#test0209.
Reopen to fix for 3.2.2. In 3.2.2 the error message is not optimal since we have to reuse existing error messages. In HEAD the error message is much better. Created attachment 51098 [details]
New patch for 3.2 maintenance
Remove new error message to reuse only the existing ones.
Created attachment 51099 [details]
Updated regression tests
Released for 3.2.2. Regression tests added in org.eclipse.jdt.core.tests.compiler.regression.AnnotationTest#test208/211 Verified for 3.3 M2 using build I200609220010. Verified for 3.2.2 using build M20070112-1200. |