Project: JDT
Bug 134523 SIOOBE when 'Find Broken NLS Keys' on accessor class in default package
Reported: 2006-04-03 10:50:24 | Status: resolved fixed

I20060331-2000 1. Create new Class in default package 2. Add field private String s1= ""; 3. Execute 'Externalize Strings' 4. Accept default settings 5. On 'Messages.java' Execute 'Source->Find Broken NLS Keys' -> java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1768) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSHintHelper.getResourceBundle(NLSHintHelper.java:345) at org.eclipse.jdt.internal.ui.actions.FindBrokenNLSKeysAction.tryIfPropertyCuSelected(FindBrokenNLSKeysAction.java:277) at org.eclipse.jdt.internal.ui.actions.FindBrokenNLSKeysAction.canEnable(FindBrokenNLSKeysAction.java:212) at org.eclipse.jdt.internal.ui.actions.FindBrokenNLSKeysAction.selectionChanged(FindBrokenNLSKeysAction.java:168) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged(SelectionDispatchAction.java:255) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.selectionChanged(SelectionDispatchAction.java:250) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:816) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1922) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1099) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1125) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3346) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966) 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:143) 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:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) 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 refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHintHelper.java