Bug 172648

Summary: [model] Some inconsistencies while adding listeners to DeltaProcessingState
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: 3.3 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch none

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.