Bug 41743 [MenuMgmt] IContributionManager.remove has undocumented behavior
build 20030820 The doc for IContributionManager.remove says that null will be returned if "this manager has no contribution items with the given id". When I call remove on a menu with an invalid ID I get an IllegalArgumentException instead of a null return value.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/ContributionManager.java
}
    
    
	final IContributionItem oldItem = (IContributionItem) contributions.get(index);
	itemRemoved(oldItem);
	
	
	contributions.set(index, replacementItem);
	itemAdded(replacementItem); 
	
	
	for (int i = contributions.size() - 1; i > index; i--) {
	    IContributionItem item = (IContributionItem) contributions.get(i);
	    if ((item != null) && (identifier.equals(item.getId()))) {
            if ("true".equalsIgnoreCase(Platform 
                    .getDebugOption("org.eclipse.jface/trace/toolbarDisposal"))) { 
                System.out.println("Removing duplicate on replace: " + identifier); 
            }
	        contributions.remove(i);
	        itemRemoved(item);
	    }
	}
	
	return true; 
}
/**
 * Sets whether this manager is dirty. When dirty, the list of contributions 
 * is not accurately reflected in the corresponding widgets.
 *
 * @param <code>true</code> if this manager is dirty, and <code>false</code>