Bug 57720 ArrayIndexOutOfBoundsException after code assist
20040407 smoke while doing a code assist: java.lang.ArrayIndexOutOfBoundsException at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at java.lang.ArrayIndexOutOfBoundsException.<init>(ArrayIndexOutOfBoundsException.java) at org.eclipse.jface.text.templates.TemplateVariable.getDefaultValue(TemplateVariable.java:119) at org.eclipse.jdt.internal.ui.text.template.contentassist.MultiVariable.setValues(MultiVariable.java:57) at org.eclipse.jdt.internal.corext.template.java.JavaContextType$Array.resolve(JavaContextType.java:48) at org.eclipse.jface.text.templates.ContextType.resolve(ContextType.java:210) at org.eclipse.jdt.internal.corext.template.java.JavaContext.evaluate(JavaContext.java:119) at org.eclipse.jdt.internal.ui.text.template.contentassist.TemplateProposal.getAdditionalProposalInfo(TemplateProposal.java:274) at org.eclipse.jface.text.contentassist.AdditionalInfoController.computeInformation(AdditionalInfoController.java:221) at org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:734) at org.eclipse.jface.text.AbstractInformationControlManager.showInformation(AbstractInformationControlManager.java:724) at org.eclipse.jface.text.contentassist.AdditionalInfoController$1.run(AdditionalInfoController.java:173) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1561) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1532) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:257) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:140) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:90) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:279) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:241) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at org.eclipse.core.launcher.Main.basicRun(Main.java:267) at org.eclipse.core.launcher.Main.run(Main.java:692) at org.eclipse.core.launcher.Main.main(Main.java:676)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/MultiVariable.java
fSet= getDefaultValue();
	}
	
	/**
	 * Sets the values of this variable under a specific set.
	 * 
	 * @param set the set identifier for which the values are valid
	 * @param values the possible values of this variable
	 */
	public void setValues(Object set, String[] values) {
		Assert.isNotNull(set);
		Assert.isTrue(values.length > 0);
		fValueMap.put(set, values);
		if (fDefaultKey == null) {
			fDefaultKey= set;
			fSet= getDefaultValue();
		}
	}
	
	
	/*
	 * @see org.eclipse.jface.text.templates.TemplateVariable#setValues(java.lang.String[])
	 */
	public void setValues(String[] values) {
		if (fValueMap != null) {
			fValueMap.put(fDefaultKey, values);
			fSet= getDefaultValue();
		}
	}