Bug 5414

Summary: ArrayIndexOutOfBoundsException in Signature
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: David Audel <david_audel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.0   
Target Milestone: 2.0 M1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Martin Aeschlimann CLA 2001-11-01 10:48:45 EST
Had the following Exception:

org.eclipse.swt.SWTException: java.lang.ArrayIndexOutOfBoundsException: 4
	at org.eclipse.jdt.core.Signature.createTypeSignature(Signature.java
(Compiled Code))
	at org.eclipse.jdt.internal.core.SourceFieldElementInfo.getTypeSignature
(SourceFieldElementInfo.java:53)
	at org.eclipse.jdt.internal.core.SourceField.getTypeSignature
(SourceField.java:48)
	at 
org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels.getFieldLabel
(JavaElementLabels.java:379)

I guess the problem is that createTypeSignature switch clause misses 'break' 
statements for some choices.
Comment 1 Philipe Mulet CLA 2001-11-07 11:07:01 EST
Was able to reproduce on a simpler example:

public class X {

	void foo(){
		
		System.out.println(
			new Runnable(){
				<CODE ASSIST HERE>
			}
		);
	}

}

Then select method 'run()' and insert it, the walkback occurs right after it in 
the UI (suspecting it triggers automatically another code assist at this point, 
which is the one crashing us).
Comment 2 Philipe Mulet CLA 2001-11-07 11:30:05 EST
Ignore my previous comment it was related to 5618.
Comment 3 David Audel CLA 2001-11-21 10:21:49 EST
Fixed