Community
Participate
Working Groups
20070919-0010 - fresh workspace - create a project 'Test' - import JUnit 3.8.1 source in its source folder - go to the project's compiler property page and switch the classfile compliance to CLDC 1.1 (compliance 1.3, classfile CLDC 1.1, source 1.3, ignore, ignore, all classfile options checked) java.lang.ArrayIndexOutOfBoundsException: -1 at org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:105) at org.eclipse.jdt.internal.compiler.ClassFile.traverse(ClassFile.java:7858) at org.eclipse.jdt.internal.compiler.ClassFile.completeCodeAttribute(ClassFile.java:2123) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:238) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:173) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:529) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:580) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:214) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:855) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:517) at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:869) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:653) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:540) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:533) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:474) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:462) at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:122) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:168) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:153) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
I am investigating. This could also mean that the 1.6 code generation might be broken since CLDC and 1.6 are sharing the underlying stack frames.
Created attachment 78773 [details] Proposed fix
Created attachment 78779 [details] Regression tests
Released for 3.4M2. Regression tests added in org.eclipse.jdt.core.tests.compiler.regression.Compliance_CLDC#test001
Verified for 3.4M2 using build I20070921-0919.