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
* </p>
     * 
     * @param parentShell
     *            the parent shell, or <code>null</code> to create a top-level
     *            shell
     * @param dialogTitle
     *            the dialog title, or <code>null</code> if none
     * @param dialogMessage
     *            the dialog message, or <code>null</code> if none
     * @param initialValue
     *            the initial input value, or <code>null</code> if none
     *            (equivalent to the empty string)
     * @param validator
     *            an input validator, or <code>null</code> if none
     */
    public InputDialog(Shell parentShell, String dialogTitle,
            String dialogMessage, String initialValue, IInputValidator validator) {
        super(parentShell);
        this.title = dialogTitle;
        message = dialogMessage;
        if (initialValue == null) {
			value = "";
		} else {
			value = initialValue;
		}
        this.validator = validator;
    }
    /*
     * (non-Javadoc) Method declared on Dialog.
     */