Bug 9395 - ClassCastException during build
Summary: ClassCastException during build
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: Other other
: P1 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-11 10:42 EST by Olivier Thomann CLA
Modified: 2002-02-12 06:13 EST (History)
2 users (show)

See Also:


Attachments
contains the class file which has compiler errros with < V 20020208 (5.18 KB, application/octet-stream)
2002-02-11 12:59 EST, Daniel Schaller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2002-02-11 10:42:53 EST
From EC:
Using 20020208, rebuild a project, which in 20020129 was free of errors, I get the 
following compiler error:

Log: Sun Feb 10 14:46:04 CET 2002
2 
org.eclipse.core.resources 2 Problems occurred when invoking code from plug-in: 
org.eclipse.core.resources.
java.lang.ClassCastException: 
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration
	at 
org.eclipse.jdt.internal.compiler.ast.TryStatement.resolve(TryStatement.java:358)
	at 
org.eclipse.jdt.internal.compiler.ast.Block.resolve(Block.java:81)
	at 
org.eclipse.jdt.internal.compiler.ast.Initializer.resolve(Initializer.java:63)
	at 
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:720)
	at 
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:756)
	at 
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:188)
	at 
org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:524)
	at 
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:332)
	at 
org.eclipse.jdt.internal.core.newbuilder.AbstractImageBuilder.compile(AbstractImageBuilder.java:209)
	at 
org.eclipse.jdt.internal.core.newbuilder.AbstractImageBuilder.compile(AbstractImageBuilder.java:156)
	at 
org.eclipse.jdt.internal.core.newbuilder.BatchImageBuilder.build(BatchImageBuilder.java:49)
	at 
org.eclipse.jdt.internal.core.newbuilder.JavaBuilder.buildAll(JavaBuilder.java:134)
	at 
org.eclipse.jdt.internal.core.newbuilder.JavaBuilder.build(JavaBuilder.java:80)
	at 
org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:367)
	at 
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:818)
	at 
org.eclipse.core.runtime.Platform.run(Platform.java:395)
	at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:125)
	at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:190)
	at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:200)
	at 
org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:149)
	at 
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:818)
	at 
org.eclipse.core.runtime.Platform.run(Platform.java:395)
	at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:163)
	at 
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:246)
	at 
org.eclipse.core.internal.resources.Project.build(Project.java:105)
	at 
org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:151)
	at 
org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:111)
	at 
org.eclipse.ui.actions.WorkspaceAction$1.execute(WorkspaceAction.java:268)
	at 
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:64)
	at 
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1232)
	at 
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:78)
	at 
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)

This 
looks like a regression.
Comment 1 Daniel Schaller CLA 2002-02-11 12:59:19 EST
Created attachment 346 [details]
contains the class file which has compiler errros with < V 20020208
Comment 2 Philipe Mulet CLA 2002-02-11 13:19:39 EST
Thank you, the offending code is the try/finally inside an initializer which we 
do not support well.

Fixed. Will be tomorrow's integration build.