Bug 66292 [Dialogs] InputDialog NPE when invoking setErrorMessage(...) too early
06081200 build Setting the error message this early is probably not anticipated, but it shouldn't throw an exception... public class Main { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); InputDialog dialog = new InputDialog (shell, "TEST", "value", "test", null); dialog.setErrorMessage("error"); dialog.open(); shell.open(); } }
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/InputDialog.java
/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jface.dialogs;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
/**
 * A simple input dialog for soliciting an input string from the user.
 * <p>
 * This concrete dialog class can be instantiated as is, or further subclassed as
 * required.
 * </p>
 */
public class InputDialog extends Dialog {