Bug 5358 Suspicious usage of IJavaElementDelta.getFlags()
Build 20011025 Searching for references to IJavaElement.getFlags(), I found suspicious usage in JDT UI code. There are pattern of code like this one: delta.getFlags() == IJavaElementDelta.F_CONTENT where it should be: (delta.getFlags() & IJavaElementDelta.F_CONTENT) != 0
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
import org.eclipse.jdt.internal.ui.util.JavaModelUtil;
/**
 * Manages a type hierarchy, to keep it refreshed, and to allow it to be shared.
 */
public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IElementChangedListener {
	
	private boolean fHierarchyRefreshNeeded;
	private ITypeHierarchy fHierarchy;
	private IJavaElement fInputElement;
	private boolean fIsSuperTypesOnly;
	
	private List fChangeListeners;
	
	public TypeHierarchyLifeCycle() {
		this(false);
	}	
	
	public TypeHierarchyLifeCycle(boolean isSuperTypesOnly) {
		fHierarchy= null;
		fInputElement= null;
		fIsSuperTypesOnly= isSuperTypesOnly;
		fChangeListeners= new ArrayList(2);
	}
	
	public ITypeHierarchy getHierarchy() {
		return fHierarchy;
	}
	
	public IJavaElement getInputElement() {
		return fInputElement;