Bug 86141 - [recovery] ClassCastException with annotation of parameter
Summary: [recovery] ClassCastException with annotation of parameter
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-22 10:38 EST by David Audel CLA
Modified: 2005-03-30 14:59 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2005-02-22 10:38:18 EST
build I20050219-1500

1) create X.java

public class X {
   void foo(int var1, @Annot(at1=zzz, at2) int var2) {
   }
}

2) compile
An exception occur.

java.lang.ClassCastException
	at
org.eclipse.jdt.internal.compiler.parser.RecoveredMethod.updateFromParserState(RecoveredMethod.java:364)
	at
org.eclipse.jdt.internal.codeassist.complete.CompletionParser.updateRecoveryState(CompletionParser.java:3216)
	at
org.eclipse.jdt.internal.compiler.parser.Parser.resumeOnSyntaxError(Parser.java:9135)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:8317)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:8530)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:8495)
	at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:7222)
Comment 1 David Audel CLA 2005-02-23 07:51:34 EST
Fixed ans test added
  AnnotationDietRecoveryTest#test0008()

MemberValuePair must be remove from astStack inside
RecoveredMethod#updateFromParserState()
Comment 2 Olivier Thomann CLA 2005-03-30 14:59:14 EST
The ClassCastException is fixed, but the number of errors in this case is
suspicious.
Verified in I20050330-0500 as the original problem is gone.