Project: JDT
Bug 154534 [content assist][templates] Endless loop in JavaContext.suggestVariableName
Reported: 2006-08-21 09:56:27 | Status: verified fixed

I20060816-1200 + ZRH plug-ins from 20060817_1526 In a method like the one below, I pressed Ctrl+Space in the empty body and then Down_Arrow to select the template "for - iterate over array with temp...". void checkMappingChanged(.., .., Object[][] objs) { } Stackdump while in endless loop: "main" prio=6 tid=0x00280048 nid=0x2a10 runnable [0x0007e000..0x0007fc44] at java.lang.String.endsWith(String.java:1296) at org.eclipse.jdt.internal.corext.template.java.JavaContext.suggestVariableName(JavaContext.java:394) at org.eclipse.jdt.internal.corext.template.java.JavaContext.suggestVariableNames(JavaContext.java:377) at org.eclipse.jdt.internal.corext.template.java.JavaContextType$AbstractIterableElement.resolve(JavaContextType.java:204) at org.eclipse.jface.text.templates.TemplateContextType.resolve(TemplateContextType.java:272) at org.eclipse.jface.text.templates.TemplateContextType.resolve(TemplateContextType.java:239) at org.eclipse.jdt.internal.corext.template.java.JavaContext.evaluate(JavaContext.java:164) at org.eclipse.jdt.internal.ui.text.template.contentassist.TemplateProposal.getAdditionalProposalInfo(TemplateProposal.java:391) at org.eclipse.jface.text.contentassist.AdditionalInfoController$6.run(AdditionalInfoController.java:162) - locked <0x1b3aa948> (a org.eclipse.jface.text.contentassist.AdditionalInfoController$10) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) - locked <0x1024df30> (a org.eclipse.swt.widgets.RunnableLock) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3354) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3000) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContext.java