Bug 82706 [Wizards] WizardDialog: code inconsistent
As long as WizardDialog.updateTitleBar() is a public method (should it be?) it's not a bad idea to check dialog state in all appropriate places. Now: public void updateTitleBar() { String s = null; if(currentPage != null) s = currentPage.getTitle(); if (s == null) s = ""; //$NON-NLS-1$ setTitle(s); if(currentPage != null) setTitleImage(currentPage.getImage()); updateDescriptionMessage(); updateMessage(); } It accurately checks that currentPage != null, but forgets to do the same before calling of updateDescriptionMessage() method wich works with currentPage without any checking. This can cause NPE (which happened to me :-)).
bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
else
            pageMessageType = IMessageProvider.NONE;
        if (pageMessage == null)
            setMessage(pageDescription);
        else
            setMessage(pageMessage, pageMessageType);
        setErrorMessage(currentPage.getErrorMessage());
    }
    /**
     * Changes the shell size to the given size, ensuring that
     * it is no larger than the display bounds.
     * 
     * @param width the shell width
     * @param height the shell height
     */
    private void setShellSize(int width, int height) {
        Rectangle size = getShell().getBounds();
        size.height = height;
        size.width = width;
        getShell().setBounds(getConstrainedShellBounds(size));
    }
    /**
     * Computes the correct dialog size for the current page and resizes 
     * its shell if nessessary. Also causes the container to refresh its
     * layout.
     * 
     * @param page the wizard page to use to resize the dialog
     * @since 2.0
     */
    protected void updateSize(IWizardPage page) {