Bug 27941 - ClassCastException in CompletionParser
Summary: ClassCastException in CompletionParser
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 28150 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-12-09 09:47 EST by Jerome Lanneluc CLA
Modified: 2002-12-18 04:31 EST (History)
1 user (show)

See Also:


Attachments
CU that has the problem (14.80 KB, text/plain)
2002-12-09 09:50 EST, Jerome Lanneluc CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2002-12-09 09:47:51 EST
Build 20021104 + latest JDT Core

Got the following ClassCastException while code assisting:
java.lang.ClassCastException
        at 
org.eclipse.jdt.internal.codeassist.complete.CompletionParser.consumeBinaryExpre
ssion(CompletionParser.java:876)
        at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule
(Parser.java:3552)
        at org.eclipse.jdt.internal.compiler.parser.Parser.parse
(Parser.java:6874)
        at org.eclipse.jdt.internal.compiler.parser.Parser.parse
(Parser.java:7091)
        at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse
(Parser.java:4707)
        at 
org.eclipse.jdt.internal.codeassist.complete.CompletionParser.dietParse
(CompletionParser.java:1543)
        at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete
(CompletionEngine.java:820)
        at org.eclipse.jdt.internal.core.Openable.codeComplete
(Openable.java:124)
        at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete
(CompilationUnit.java:104)
        at 
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.internalComputeCom
pletionProposals(JavaCompletionProcessor.java:342)
        at 
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.computeCompletionP
roposals(JavaCompletionProcessor.java:300)
        at 
org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals
(ContentAssistant.java:1279)
        at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals
(CompletionProposalPopup.java:178)
        at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7
(CompletionProposalPopup.java:177)
        at org.eclipse.jface.text.contentassist.CompletionProposalPopup$3.run
(CompletionProposalPopup.java:139)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:65)
        at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals
(CompletionProposalPopup.java:134)
        at 
org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions
(ContentAssistant.java:1199)
        at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer
.doOperation(CompilationUnitEditor.java:238)
        at org.eclipse.ui.texteditor.ContentAssistAction$1.run
(ContentAssistAction.java:84)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:65)
        at org.eclipse.ui.texteditor.ContentAssistAction.run
(ContentAssistAction.java:82)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:769)
        at org.eclipse.ui.internal.WWinKeyBindingService.invoke
(WWinKeyBindingService.java:139)
        at org.eclipse.ui.internal.WWinKeyBindingService.pressed
(WWinKeyBindingService.java:120)
        at org.eclipse.ui.internal.WWinKeyBindingService$6.widgetSelected
(WWinKeyBindingService.java:376)
        at org.eclipse.ui.internal.AcceleratorMenu$2.handleEvent
(AcceleratorMenu.java:55)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1405)
        at org.eclipse.ui.internal.Workbench.run(Workbench.java:1388)
        at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:841)
        at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
        at org.eclipse.core.launcher.Main.run(Main.java:703)
        at org.eclipse.core.launcher.Main.main(Main.java:539)
Comment 1 Jerome Lanneluc CLA 2002-12-09 09:50:30 EST
Created attachment 2724 [details]
CU that has the problem

To reproduce, position cursor at line 270, column 45 and Ctrl+Space.
Comment 2 David Audel CLA 2002-12-10 07:12:34 EST
Simple test case :

public class X {
   void foo() {
      String s = "a" + "b";
      zzz<cursor>
   }
}
Comment 3 David Audel CLA 2002-12-10 12:08:05 EST
Fixed.
Comment 4 David Audel CLA 2002-12-12 05:08:18 EST
*** Bug 28150 has been marked as a duplicate of this bug. ***
Comment 5 David Audel CLA 2002-12-18 04:31:24 EST
Verified.