Summary: | [DOM] Annotations are recognized by ASTParser even in COMPILER_SOURCE is set < 1.5 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Robert Walter <rwalter> | ||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | minor | ||||||||
Priority: | P3 | CC: | jerome_lanneluc, Olivier_Thomann | ||||||
Version: | 3.3.2 | ||||||||
Target Milestone: | 3.5 M2 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Robert Walter
2008-08-27 03:54:35 EDT
Created attachment 111043 [details]
Demo Project to illustrate problem
Indeed, we should return an empty CompilationUnit (since the source contains syntax errors) with getProblems() that would return the syntax errors. Note that we still return the syntax error in the compilation unit's problems. In case the scanner source is < 1.5, we should not convert annotation declarations. Created attachment 111087 [details]
Proposed fix + regression tests
Released for 3.5M2. Regression tests added in org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2#test0695 org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2#test0696 Verified for 3.5M2 using I20080914-2000 |