Bug 169778 [ErrorHandling] NPE in org.eclipse.ui.internal.ide.StatusUtil [PatchAttached]
Build ID: I20061214-1445
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/StatusUtil.java
statusMessage = exception.toString();
			} else {
				statusMessage = exception.getMessage();
			}
        }
        return new Status(severity, IDEWorkbenchPlugin.IDE_WORKBENCH, severity,
                statusMessage, exception);
    }
    /**
     * This method must not be called outside the workbench.
     *
     * Utility method for creating status.
     */
    public static IStatus newStatus(List children, String message,
            Throwable exception) {
        List flatStatusCollection = new ArrayList();
        Iterator iter = children.iterator();
        while (iter.hasNext()) {
            IStatus currentStatus = (IStatus) iter.next();
            Iterator childrenIter = flatten(currentStatus).iterator();
            while (childrenIter.hasNext()) {
				flatStatusCollection.add(childrenIter.next());
			}
        }
        IStatus[] stati = new IStatus[flatStatusCollection.size()];
        flatStatusCollection.toArray(stati);
        return newStatus(stati, message, exception);
    }
}