Bug 227855 - incorrect compilation errors related to annotations
Summary: incorrect compilation errors related to annotations
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-18 18:12 EDT by Karen Butzke CLA
Modified: 2008-04-29 07:28 EDT (History)
4 users (show)

See Also:


Attachments
Proposed fix (4.91 KB, patch)
2008-04-23 04:19 EDT, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2008-04-18 18:12:35 EDT
Running eclipse 3.4M6a.  With the following java class you receive 2 compilation errors, one of them being incorrect. The first is for the incomplete @SuppressWarnings.   The second is: "The field id can only set one of public / protected / private".  If the constructor is not there, only the first compilation error occurs.  

Interestingly, you can see the same problem if you remove the semi-colon from the package statement (with the annotations correctly formed).

Neither of these problems exists in 3.3.2


package com.test;

@SuppressWarnings(value=)
public class Test {

	public Test() {
	}
	
	@SuppressWarnings(value="")
	private int id;
}
Comment 1 Olivier Thomann CLA 2008-04-18 19:28:54 EDT
Seems to be related to recovery since the code is syntactically wrong.
Comment 2 Philipe Mulet CLA 2008-04-18 19:32:48 EDT
Would be indeed related to new recovery in annotations.
Comment 3 David Audel CLA 2008-04-23 04:19:39 EDT
Created attachment 97169 [details]
Proposed fix
Comment 4 David Audel CLA 2008-04-23 04:21:54 EDT
Released for 3.4M7.

Tests added
  AnnotationDietRecoveryTest#test0036() -> test0037()
Comment 5 Eric Jodet CLA 2008-04-29 07:28:52 EDT
Verified for 3.4M7 using I20080427-2000.