Bug 15142 - CCE in SourceConstructorDeclaration
Summary: CCE in SourceConstructorDeclaration
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-02 16:09 EDT by Erich Gamma CLA
Modified: 2002-05-14 06:05 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 Erich Gamma CLA 2002-05-02 16:09:24 EDT
Did a replace all of an "e" with the empty string, but I cannot reconstruct the 
source file where the error has shown up.


org.eclipse.swt.SWTException: Failed to execute runnable 
(java.lang.ClassCastException: 
org.eclipse.jdt.internal.compiler.parser.SourceConstructorDeclaration)
	at org.eclipse.swt.SWT.error(SWT.java:1887)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:866)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:733)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:349)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:162)
	at org.eclipse.core.launcher.Main.run(Main.java:588)
	at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)

*** Stack trace of contained exception ***
java.lang.ClassCastException: 
org.eclipse.jdt.internal.compiler.parser.SourceConstructorDeclaration
	at 
org.eclipse.jdt.internal.compiler.parser.Parser.consumeClassHeaderImplements
(Parser.java:1457)
	at 
org.eclipse.jdt.internal.compiler.parser.RecoveredType.updateFromParserState
(RecoveredType.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.parser.Parser.updateRecoveryState
(Parser.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java
(Compiled Code))
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java
(Compiled Code))
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java
(Compiled Code))
	at 
org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit
(SourceElementParser.java:1028)
	at org.eclipse.jdt.internal.core.CompilationUnit.generateInfos
(CompilationUnit.java:328)
	at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure
(CompilationUnit.java(Compiled Code))
	at org.eclipse.jdt.internal.core.CompilationUnit.makeConsistent
(CompilationUnit.java:668)
	at org.eclipse.jdt.internal.core.WorkingCopy.reconcile
(WorkingCopy.java:342)
	at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.getElementAt
(CompilationUnitEditor.java:515)
	at 
org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.synchronizeOutlinePageSelectio
n(JavaEditor.java:281)
	at 
org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$OutlinePageSelectionUpdater.ru
n(JavaEditor.java:93)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:866)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:733)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:349)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:162)
	at org.eclipse.core.launcher.Main.run(Main.java:588)
	at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)
Comment 1 David Audel CLA 2002-05-14 06:05:43 EDT
I can not reproduce this bug.

Added protection in RecoveredType#updateFromParserState() and 
RecoveredMethod#updateFromParserState() to avoid CCE.