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/resource/ImageRegistry.java
}
		if (entry.image == null && entry.descriptor != null) {
			entry.image = entry.descriptor.createImage();
		}
		return entry.image;
	}
	/**
	 * Returns the descriptor associated with the given key in this registry, 
	 * or <code>null</code> if none.
	 *
	 * @param key the key
	 * @return the descriptor, or <code>null</code> if none
	 * @since 2.1
	 */
	public ImageDescriptor getDescriptor(String key) {
		Entry entry = getEntry(key);
		if (entry == null) {
			return null;
		}
		return entry.descriptor;
	}
	/**
	 * Shut downs this resource registry and disposes of all registered images.
	 */
	void handleDisplayDispose() {
		
		display = null;
		
		if (table == null)
			return;