Community
Participate
Working Groups
F3 1) Open the class swt Button (as a class file) 2) Select the name Button in the editor 3) Press F1 The following is written to the log: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.<init>(String.java(Compiled Code)) at org.eclipse.help.ui.internal.StyledLineWrapper.processLineBreaks (StyledLineWrapper.java:162) at org.eclipse.help.ui.internal.StyledLineWrapper.setText (StyledLineWrapper.java:130) at org.eclipse.help.ui.internal.StyledLineWrapper.<init> (StyledLineWrapper.java:29) at org.eclipse.help.ui.internal.ContextHelpDialog.createInfoArea (ContextHelpDialog.java:142) at org.eclipse.help.ui.internal.ContextHelpDialog.createContents (ContextHelpDialog.java:127) at org.eclipse.help.ui.internal.ContextHelpDialog.<init> (ContextHelpDialog.java:92) at org.eclipse.help.ui.internal.DefaultHelp.displayContext (DefaultHelp.java:66) at org.eclipse.help.ui.internal.DefaultHelp.displayHelp (DefaultHelp.java:167) at org.eclipse.ui.help.WorkbenchHelp.displayHelp(WorkbenchHelp.java:97) at org.eclipse.ui.help.WorkbenchHelp.displayHelp (WorkbenchHelp.java:125) at org.eclipse.jdt.internal.ui.util.JavaUIHelp$JavaUIHelpListener.helpRequested (JavaUIHelp.java:100) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:248) at org.eclipse.core.launcher.Main.run(Main.java:697) at org.eclipse.core.launcher.Main.main(Main.java:530)
This should be an F3 candidate. The fix is to break the for loop when starting point goes past the lenght of the string. After each change to "start" do if (start >= textChars.length) break; The test can be put in the for condition, but this way it will be faster, we only check it when starting a new line.
F4 candidate. Value: medium/high Risk: low (problem understood, fix available)
Fixed in F4.