Bug 108624 [Coolbar] incorrect downcast in SubCoolBarManager.getStyle()
The downcast in this method public int getStyle() { // It is okay to cast down since we only accept coolBarManager objects in the // constructor return ((CoolBarManager) getParent()).getStyle(); } is not okay because the constructor accepts ICoolBarManager objects. Since ICoolBarManager has a method getStyle(), the downcast should be to ICoolBarManager, not to CoolBarManager.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/SubCoolBarManager.java
/*******************************************************************************
 * Copyright (c) 2003, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jface.action;
import org.eclipse.jface.util.Assert;
/**
 * A <code>SubCoolBarManager</code> monitors the additional and removal of 
 * items from a parent manager so that visibility of the entire set can be changed as a
 * unit.
 * 
 * @since 3.0
 */
public class SubCoolBarManager extends SubContributionManager implements