Bug 68058 NPE in JUnit view [JUnit]
RC3, probably happens on all platforms - open a JUnit view --> should open empty - right-click in the Failure Trace table at the bottom and the following exception occurs: java.lang.NullPointerException at org.eclipse.jdt.internal.junit.ui.FailureTrace.menuAboutToShow(FailureTrace.java:111) at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:286) at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:370) at org.eclipse.jface.action.MenuManager.access$0(MenuManager.java:367) at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:383) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:116) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:731) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:752) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:735) at org.eclipse.swt.widgets.Menu.setVisible(Menu.java:784) at org.eclipse.swt.widgets.Control.showMenu(Control.java:2537) at org.eclipse.swt.widgets.Control.XButtonPress(Control.java:2925) at org.eclipse.swt.widgets.Composite.XButtonPress(Composite.java:812) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:903) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3478) at org.eclipse.swt.internal.motif.OS.XtDispatchEvent(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2640) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1375) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1346) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:252) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:272) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:128) 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:186) at org.eclipse.core.launcher.Main.run(Main.java:647) at org.eclipse.core.launcher.Main.main(Main.java:631)
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/FailureTrace.java
* Clears the non-stack trace info
	 */
	public void clear() {
		fTable.removeAll();
		fInputTrace= null;
	}
	
	private String filterStack(String stackTrace) {	
		if (!JUnitPreferencePage.getFilterStack() || stackTrace == null) 
			return stackTrace;
			
		StringWriter stringWriter= new StringWriter();
		PrintWriter printWriter= new PrintWriter(stringWriter);
		StringReader stringReader= new StringReader(stackTrace);
		BufferedReader bufferedReader= new BufferedReader(stringReader);	
			
		String line;
		String[] patterns= JUnitPreferencePage.getFilterPatterns();
		try {	
			while ((line= bufferedReader.readLine()) != null) {
				if (!filterLine(patterns, line))
					printWriter.println(line);
			}
		} catch (IOException e) {
			return stackTrace; 
		}
		return stringWriter.toString();
	}
	
	private boolean filterLine(String[] patterns, String line) {