Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 304795

Summary: DeferredUpdateManager missing synchronized on performValidation
Product: [Tools] GEF Reporter: Heiko Böttger <heiko.boettger>
Component: GEF-Legacy Draw2dAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 3.5.1   
Target Milestone: 3.7.1 (Indigo) M5   
Hardware: All   
OS: All   
Whiteboard:

Description Heiko Böttger CLA 2010-03-05 05:35:50 EST
Build Identifier: 

When looking on the code of org.eclipse.draw2d.DeferredUpdateManager, I saw that #addInvalidFigure is synchronized while #performValidation is not. Since both methods access the field #invalidFigures, I wonder which is correct. I always though that the UpdateManager is only used by UI-Thread, in this case there isn't any synchronization needed.

Reproducible: Didn't try

Steps to Reproduce:
Setup two threads one calling addInvalidFigure and the another calling performValidation.
Comment 1 Heiko Böttger CLA 2010-03-05 05:42:09 EST
Build Identifier:  M20090917-0800
Comment 2 Alexander Nyßen CLA 2011-02-02 16:35:01 EST
Added keyword. Committed change to cvs HEAD (3.7M5). Resolving as fixed.