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
if (page == null || page.getControl() == null)
            return;
        updateSizeForPage(page);
        pageContainerLayout.layoutPage(page.getControl());
    }
    /* (non-Javadoc)
     * @see org.eclipse.jface.wizard.IWizardContainer2#updateSize()
     */
    public void updateSize() {
        updateSize(currentPage);
    }
    /**
     * Computes the correct dialog size for the given page and resizes 
     * its shell if nessessary.
     *
     * @param page the wizard page
     */
    private void updateSizeForPage(IWizardPage page) {
        
        Point delta = calculatePageSizeDelta(page);
        if (delta.x > 0 || delta.y > 0) {
             
            Shell shell = getShell();
            Point shellSize = shell.getSize();
            setShellSize(shellSize.x + delta.x, shellSize.y + delta.y);
            constrainShellSize();
        }
    }
    /**
     * Computes the correct dialog size for the given wizard and resizes