Bug 33458 StringIndexOutOfBoundsException from Junit HierarchyRunView
20030227 I am attempting to run my PDE JUnit tests for Debug and Ant Core. All produce similar stack traces to the following: java.lang.StringIndexOutOfBoundsException: String index out of range: -57 at java.lang.String.substring(String.java:1480) at org.eclipse.jdt.internal.junit.ui.HierarchyRunView.newTreeEntry (HierarchyRunView.java:305) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart$4.run (TestRunnerViewPart.java:477) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:31) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:94) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1752) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1487) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) 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)
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java
}
			else if(args[i].toLowerCase().equals("-host")) { 
				fHost= args[i+1];
				i++;
			}
			else if(args[i].toLowerCase().equals("-keepalive")) { 
				fKeepAlive= true;
			}
			else if(args[i].toLowerCase().equals("-debugging") || args[i].toLowerCase().equals("-debug")){ 
				fDebugMode= true;
			}
		}
		if(fTestClassNames == null || fTestClassNames.length == 0)
			throw new IllegalArgumentException(JUnitMessages.getString("RemoteTestRunner.error.classnamemissing")); 
		if (fPort == -1)
			throw new IllegalArgumentException(JUnitMessages.getString("RemoteTestRunner.error.portmissing")); 
		if (fDebugMode)
			System.out.println("keepalive "+fKeepAlive); 
	}
	private void readTestNames(String testNameFile) throws IOException {
		BufferedReader br= new BufferedReader(new FileReader(new File(testNameFile)));
		try {
			String line;
			Vector list= new Vector();
			while ((line= br.readLine()) != null) {
				list.add(line);
			}
			fTestClassNames= (String[]) list.toArray(new String[list.size()]);
		}
		finally {