Bug 5358 - Suspicious usage of IJavaElementDelta.getFlags()
Summary: Suspicious usage of IJavaElementDelta.getFlags()
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-30 11:04 EST by Jerome Lanneluc CLA
Modified: 2001-10-31 13:21 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2001-10-30 11:04:34 EST
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
Comment 1 Erich Gamma CLA 2001-10-30 11:31:56 EST
TypeHierarchyLifeCycle is using this pattern inside processDelta

Comment 2 Martin Aeschlimann CLA 2001-10-31 13:21:33 EST
fixed > 11025