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/MessageDialog.java
* <p>
	 * The labels of the buttons to appear in the button bar are supplied in
	 * this constructor as an array. The <code>open</code> method will return
	 * the index of the label in this array corresponding to the button that was
	 * pressed to close the dialog. If the dialog was dismissed without pressing
	 * a button (ESC, etc.) then -1 is returned. Note that the <code>open</code>
	 * method blocks.
	 * </p>
	 * 
	 * @param parentShell
	 *            the parent shell
	 * @param dialogTitle
	 *            the dialog title, or <code>null</code> if none
	 * @param dialogTitleImage
	 *            the dialog title image, or <code>null</code> if none
	 * @param dialogMessage
	 *            the dialog message
	 * @param dialogImageType
	 *            one of the following values:
	 *            <ul>
	 *            <li><code>MessageDialog.NONE</code> for a dialog with no
	 *            image</li>
	 *            <li><code>MessageDialog.ERROR</code> for a dialog with an
	 *            error image</li>
	 *            <li><code>MessageDialog.INFORMATION</code> for a dialog
	 *            with an information image</li>
	 *            <li><code>MessageDialog.QUESTION </code> for a dialog with a
	 *            question image</li>
	 *            <li><code>MessageDialog.WARNING</code> for a dialog with a
	 *            warning image</li>