Bug 32273 StringIndexOutOfBoundsException in JUnit plugin [JUnit]
Using 0218 and Pde/Junit1.2.4, I got the following exception. java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1480) at org.eclipse.jdt.internal.junit.ui.FailureRunView.getClassName(FailureRunView.java:105) at org.eclipse.jdt.internal.junit.ui.FailureRunView.handleDoubleClick(FailureRunView.java:243) at org.eclipse.jdt.internal.junit.ui.FailureRunView$3.mouseDoubleClick(FailureRunView.java:205) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:134) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1288) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1271) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) I have no steps to reproduce so far, but I think it's worth logging a PR.
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/FailureRunView.java
import org.eclipse.swt.events.MouseMoveListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jdt.junit.ITestRunListener;
/**
 * A view presenting the failed tests in a table.
 */
class FailureRunView implements ITestRunView, IMenuListener {
	private Table fTable;
	private TestRunnerViewPart fRunnerViewPart;
	private boolean fPressed= false;
	
	private final Image fErrorIcon= TestRunnerViewPart.createImage("obj16/testerr.gif"); 
	private final Image fFailureIcon= TestRunnerViewPart.createImage("obj16/testfail.gif"); 
	private final Image fFailureTabIcon= TestRunnerViewPart.createImage("obj16/failures.gif"); 
	
	public FailureRunView(CTabFolder tabFolder, TestRunnerViewPart runner) {
		fRunnerViewPart= runner;