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
/**
     *	Answer a flat collection of the passed status and its recursive children
     */
    protected static List flatten(IStatus aStatus) {
        List result = new ArrayList();
        if (aStatus.isMultiStatus()) {
            IStatus[] children = aStatus.getChildren();
            for (int i = 0; i < children.length; i++) {
                IStatus currentChild = children[i];
                if (currentChild.isMultiStatus()) {
                    Iterator childStatiiEnum = flatten(currentChild).iterator();
                    while (childStatiiEnum.hasNext()) {
						result.add(childStatiiEnum.next());
					}
                } else {
					result.add(currentChild);