Community
Participate
Working Groups
From Eclipse corner (not sure what the build number is, and no test case): .metadata/.log file. Log: Tue Nov 27 18:03:34 CET 2001 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.lookup.SourceTypeBinding at org.eclipse.jdt.internal.compiler.lookup.BlockScope.emulateOuterAccess (BlockScope.java:297) at org.eclipse.jdt.internal.compiler.lookup.BlockScope.propagateInnerEmul ation(BlockScope.java:1144) at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.manageEnclo singInstanceAccessIfNecessary(AllocationExpression.java:112) at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.analyseCode (AllocationExpression.java:40) at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.analyseCode(Loc alDeclaration.java:40) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.analys eCode(AbstractMethodDeclaration.java:79) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(Type Declaration.java:143) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.an alyseCode(QualifiedAllocationExpression.java:48) at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.analyseCode(Loc alDeclaration.java:40) at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.analyseCo de(ConstructorDeclaration.java:54) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(Type Declaration.java:357) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.analy seCode(CompilationUnitDeclaration.java:67) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:379) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:202) at org.eclipse.jdt.internal.core.builder.impl.AbstractImageBuilder.compil e(AbstractImageBuilder.java:90) at org.eclipse.jdt.internal.core.builder.impl.BatchImageBuilder.build(Bat chImageBuilder.java:84) at org.eclipse.jdt.internal.core.builder.impl.JavaDevelopmentContextImpl. createState(JavaDevelopmentContextImpl.java:146) at org.eclipse.jdt.internal.core.builder.impl.JavaBuilder.fullBuild(JavaB uilder.java:148) at org.eclipse.jdt.internal.core.builder.impl.JavaBuilder.build(JavaBuild er.java:51) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java: 93) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatfor m.java:758) at org.eclipse.core.runtime.Platform.run(Platform.java:393) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager. java:114) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager. java:73) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager. java:41) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java: 140) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatfor m.java:758) at org.eclipse.core.runtime.Platform.run(Platform.java:393) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager. java:154) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java: 214) at org.eclipse.core.internal.resources.Project.build(Project.java:110) at org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:90 ) at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:11 1) at org.eclipse.ui.actions.WorkspaceAction$1.execute(WorkspaceAction.java: 268) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyO peration.java:64) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1197) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOpe ration.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalC ontext.java:98) > Then please enter a bug report against JDT/Core with reproduceable steps, > and we will investigate it. > > This seems like you found a bug in our compiler implementation, and it is > causing the Java builder to abort. > You should still have obtain a Java problem with the stack trace in it, but > with the steps we can investigate why this too did not occur. I tried to boil this down, but it seems to require too many imports and other conditions to be in place to be reproducible. Strange enough I was finally able to resolve this by renaming a completely "innocent"-looking variable "protected java.util.List documentList;" to "protected java.util.List docList;"
This indicates that a toplevel source type was accessed when expecting a inner source type during innerclass emulation. Test case would be much appreciated.
Might need extra protection on the local variable emulation path (if isNestedType check). Should investigate reproduceable scenario on this path.
mmo@zurich.ibm.com finally confessed it only occurred in 1.0 build. Then it is simply a duplicate of a long fixed bug. Duplicate of 1GKXCOM: ITPJCORE:WIN2000 - ClassCastException during inner class emulation can be found in the release notes for build 20011011.