Bug 61709 NPE in JUnit view plus strange behavior
I200405060200 + plug-in export for I200405110800 I was running two JUnit plug-in tests from two different workbench window (maybe I switched to early from one window to the other). I then saw very odd behavior: the JUnit view switched showing results from both tests (see attached picture which shows that the jdt.ui.tests are run but a result from the refactoring tests is reported (below title). The cause for this might be the following NPE(?):
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestHierarchyTab.java
private TestRunInfo getTestInfo() {
		TreeItem[] treeItems= fTree.getSelection();
		if(treeItems.length == 0) 
			return null;
		return ((TestRunInfo)treeItems[0].getData());
	}	
	
	private boolean isSuiteSelected() {
		TreeItem[] treeItems= fTree.getSelection();
		if(treeItems.length != 1) 
			return false;
		return treeItems[0].getItemCount() > 0;
	}	
	
	private String getClassName() {
		return getTestInfo().getClassName();
	}
	
	public String getSelectedTestId() {
		TestRunInfo testInfo= getTestInfo();
		if (testInfo == null) 
			return null;
		return testInfo.getTestId();
	}		
	public String getName() {
		return JUnitMessages.getString("HierarchyRunView.tab.title"); 
	}
	
	public void setSelectedTest(String testId) {
		TreeItem treeItem= findTreeItem(testId);