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
/* (non-Javadoc)
         * Method declared on Layout.
         */
        public void layout(Composite composite, boolean force) {
            Rectangle rect = getClientArea(composite);
            Control[] children = composite.getChildren();
            for (int i = 0; i < children.length; i++) {
                children[i].setBounds(rect);
            }
        }
        /**
         * Lays outs the page according to this layout.
         *
         * @param w the control
         */
        public void layoutPage(Control w) {
            w.setBounds(getClientArea(w.getParent()));
        }
        /**
         * Sets the location of the page so that its origin is in the
         * upper left corner.
         *
         * @param w the control
         */
        public void setPageLocation(Control w) {
            w.setLocation(marginWidth, marginHeight);
        }
    }
    /**
     * Creates a new wizard dialog for the given wizard.