Bug 239945 [Coolbar] ArrayIndexOutOfBoundsException -1 in CoolBarManager.update
bundles/org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.java
}
            
            for (int i = coolItems.length - 1; i >= sourceIndex; i--) {
                final CoolItem item = coolItems[i];
                if (!item.isDisposed()) {
                    Control control = item.getControl();
                    if (control != null) {
                        item.setControl(null);
                        control.dispose();
                    }
                    item.dispose();
                    changed = true;
                }
            }
            
            updateWrapIndices();
            
            for (int i = 0; i < items.length; i++) {
                IContributionItem item = items[i];
                item.update(SIZE);
            }
            
            if (relock) {
                coolBar.setLocked(true);
            }
            if (changed) {
                updateTabOrder();
            }
            
            setDirty(false);