Bug 92988 [Viewers] potential NPE in AbstractTreeViewer
I0426, found with FindBugs 1. AbstractTreeViewer line 832 invokes "siblings.length", but the "if" statement above implies that siblings could be null here. 2. StringFieldEditor line 187 does an unnecessary null check since Text.getText() never returns null (FindBugs was using this to point to line 190 as a potential NPE).
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
disassociate(tis[i]);
                            Assert.isTrue(tis[i].getData() == null,
                                    "Second or later child is non -null");
                        }
                        tis[i].dispose();
                    }
                }
                Object d = widget.getData();
                if (d != null) {
                    Object parentElement = d;
                    Object[] children = getSortedChildren(parentElement);
                    for (int i = 0; i < children.length; i++) {
                        createTreeItem(widget, children[i], -1);
                    }
                }
            }
        });
    }
    /**
     * Creates a single item for the given parent and synchronizes it with the
     * given element.
     * 
     * @param parent
     *           the parent widget
     * @param element
     *           the element
     * @param index
     *           if non-negative, indicates the position to insert the item
     *           into its parent
     */