Bug 172648 - [model] Some inconsistencies while adding listeners to DeltaProcessingState
Summary: [model] Some inconsistencies while adding listeners to DeltaProcessingState
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-02 07:31 EST by Frederic Fusier CLA
Modified: 2007-02-06 06:41 EST (History)
0 users

See Also:


Attachments
Proposed patch (2.88 KB, patch)
2007-02-04 06:14 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2007-02-02 07:31:06 EST
JDT/Core HEAD: org.eclipse.jdt.internal.core.DeltaProcessingState has some inconsistencies in add*Listeners(...) methods...
1) one uses bit-OR to refresh listeners mask and while the other replace the value
2) one is synchronized and the other not

These inconsistencies must be fixed as follow for all methods:
1) use bit-OR while refreshing listener mask
2) always be synchronized
Comment 1 Frederic Fusier CLA 2007-02-04 06:14:04 EST
Created attachment 58197 [details]
Proposed patch

Note that calls to equals(...) method to search the listener in the stored array has been replaced with strict equality (ie. ==).
Comment 2 Frederic Fusier CLA 2007-02-04 06:14:29 EST
Released for 3.3 M5 in HEAD.
Comment 3 Maxime Daniel CLA 2007-02-06 06:41:54 EST
Checked that the proposed changes have been applied.
Verified for 3.3 M5 using build I20070205-1824.