Bug 61743 NPE in MessageDialog with null parent shell
I-build 2004-05-11 I have code that does the following: MessageDialog.openInformation(null, "Showing element", "Showning an integer of value: "+((Integer)match.getElement()).intValue()); This leads to a null pointer with the follwing stack trace: Thread [main] (Suspended (exception NullPointerException)) MessageDialog.<init>(Shell, String, Image, String, int, String[], int) line: 126 MessageDialog.openInformation(Shell, String, String) line: 305 TestUIParticipant.showMatch(Match, int, int, boolean) line: 57 JavaSearchResultPage.showMatch(Match, int, int, boolean) line: 153 AbstractTextSearchViewPage$9.run() line: 723 <snip> The API doc for MessageDialog say that I'm allowed to pass in null for the parent shell.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorDialog.java
/*
			 * @see SelectionListener.widgetSelected (SelectionEvent)
			 */
			public void widgetSelected(SelectionEvent e) {
				copyToClipboard();
			}
			/*
			 * @see SelectionListener.widgetDefaultSelected(SelectionEvent)
			 */
			public void widgetDefaultSelected(SelectionEvent e) {
				copyToClipboard();
			}
		});
		copyItem.setText(JFaceResources.getString("copy")); 
		list.setMenu(copyMenu);
		listCreated = true;
		return list;
	}
	/*
	 * (non-Javadoc) Method declared on Window.
	 */
	/**
	 * Extends <code>Window.open()</code>. Opens an error dialog to display
	 * the error. If you specified a mask to filter the displaying of these
	 * children, the error dialog will only be displayed if there is at least
	 * one child status matching the mask.
	 */
	public int open() {
		if (!AUTOMATED_MODE && shouldDisplay(status, displayMask)) {
			return super.open();