Bug 142172 [Wizards] Small overhead in WizardDialog
Here is code of method WizardDialog.updateDescriptionMessage: private void updateDescriptionMessage() { pageDescription = currentPage.getDescription(); setMessage(currentPage.getDescription()); } As you can see, it access currentPage.getDescription() two times, but value of this method is already in field pageDescription.
bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
Point delta = new Point(0, 0);
        IWizardPage[] pages = sizingWizard.getPages();
        for (int i = 0; i < pages.length; i++) {
            
            Point pageDelta = calculatePageSizeDelta(pages[i]);
            delta.x = Math.max(delta.x, pageDelta.x);
            delta.y = Math.max(delta.y, pageDelta.y);
        }
        if (delta.x > 0 || delta.y > 0) {
             
            Shell shell = getShell();
            Point shellSize = shell.getSize();
            setShellSize(shellSize.x + delta.x, shellSize.y + delta.y);
        }
    }
    /* (non-Javadoc)
     * Method declared on IWizardContainer.
     */
    public void updateTitleBar() {
        String s = null;
        if (currentPage != null) {
			s = currentPage.getTitle();
		}
        if (s == null) {
			s = ""; 
		}
        setTitle(s);
        if (currentPage != null) {
            setTitleImage(currentPage.getImage());
            updateDescriptionMessage();