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
protected void createTreeItem(Widget parent, Object element, int index) {
        Item item = newItem(parent, SWT.NULL, index);
        updateItem(item, element);
        updatePlus(item, element);
    }
    /**
     * The <code>AbstractTreeViewer</code> implementation of this method also
     * recurses over children of the corresponding element.
     */
    protected void disassociate(Item item) {
        super.disassociate(item);
        
        
        
        if (usingElementMap())
            disassociateChildren(item);
    }
    /**
     * Disassociates the children of the given SWT item from their
     * corresponding elements.
     * 
     * @param item
     *           the widget
     */
    private void disassociateChildren(Item item) {
        Item[] items = getChildren(item);
        for (int i = 0; i < items.length; i++) {
            if (items[i].getData() != null)
                disassociate(items[i]);
        }