Bug 5414 - ArrayIndexOutOfBoundsException in Signature
Summary: ArrayIndexOutOfBoundsException in Signature
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-01 10:48 EST by Martin Aeschlimann CLA
Modified: 2002-01-11 09:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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