Bug 97247

Summary: ArrayIndexOutOfBoundsException in ClassFile.addSyntheticSwitchTable
Product: [Eclipse Project] JDT Reporter: Tom Hofmann <eclipse>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: lindovsky
Version: 3.1   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
AIOOB.zip none

Description Tom Hofmann CLA 2005-05-30 09:50:38 EDT
3.1-RC1 test pass

- have the code in a project I will attach (note: my project has UTF-16
encoding, not sure whether this matters)
- open Foo.java
- get the exception
Comment 1 Tom Hofmann CLA 2005-05-30 09:51:12 EDT
Created attachment 21959 [details]
AIOOB.zip

Contains 

com.annot
  Foo.java
  Test.java
  TestType.java
Comment 2 Tom Hofmann CLA 2005-05-30 09:55:33 EDT
encoding does not seem to matter - just tested with UTF-8 and got same result.
Comment 3 Olivier Thomann CLA 2005-05-30 10:39:16 EDT
Could this be a duplicate of bug 97139?
Comment 4 Olivier Thomann CLA 2005-05-30 11:53:06 EDT
No, this is not exactly a duplicate of bug 97139.
A candidate for RC2.
Comment 5 Philipe Mulet CLA 2005-05-30 12:56:02 EDT
+1 for RC2
Comment 6 Olivier Thomann CLA 2005-05-30 13:06:54 EDT
Fixed and released in HEAD.
I reorganized the attribute code generation to always go through the method
generateMethodInfoAttribute(MethodBinding) that takes care of adding synthetic,
deprecated, exception, ... attributes.
I changed all synthetic method generations.
Comment 7 Olivier Thomann CLA 2005-05-30 13:13:25 EDT
Regression test added in
org.eclipse.jdt.core.tests.compiler.regression.EnumTest.test112.
Comment 8 Philipe Mulet CLA 2005-05-31 04:51:41 EDT
*** Bug 97396 has been marked as a duplicate of this bug. ***
Comment 9 Olivier Thomann CLA 2005-06-06 20:29:12 EDT
Verified in N20050606-0010
Comment 10 David Audel CLA 2005-06-10 09:29:30 EDT
Verified for 3.1 RC2 using build I20050610-0010