Bug 93254 - [assist] ClassCastException when complete annotation type ref
Summary: [assist] ClassCastException when complete annotation type ref
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 RC1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-29 07:47 EDT by David Audel CLA
Modified: 2005-05-27 09:06 EDT (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-04-29 07:47:10 EDT
build I20050426-1700

1) create X.java with only the following content:
@java.lang.annotation.Target

2) do ctrl+space just after 'Target'

java.lang.ClassCastException:
org/eclipse/jdt/internal/compiler/lookup/PackageBinding incompatible with
org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding
	at java.lang.Throwable.<init>(Throwable.java)
	at java.lang.Throwable.<init>(Throwable.java)
	at java.lang.ClassCastException.<init>(ClassCastException.java:54)
	at
org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:881)
	at
org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java)
	at org.eclipse.jdt.internal.core.Openable.codeComplete(Openable.java:128)
	at
org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:301)
	at
org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:294)
	at
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.internalComputeCompletionProposals(JavaCompletionProcessor.java:335)
	at
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.computeCompletionProposals(JavaCompletionProcessor.java:313)
	at
org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1499)
	at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:256)
	at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7(CompletionProposalPopup.java:253)
	at
org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run(CompletionProposalPopup.java:216)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java)
	at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:211)
	at
org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1348)
	at
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:185)
	at ...
Comment 1 David Audel CLA 2005-05-18 11:06:02 EDT
Fixed and test added
  CompletionTests_1_5#test0207()
Comment 2 Maxime Daniel CLA 2005-05-27 04:14:26 EDT
Verified on build I20050526-2000-win32.