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

Bug 476507

Summary: Ensure transactional policies can be initialized/committed multiple times in sequence.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 0.1.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2015-09-03 03:36:45 EDT
Transactional policies need to be initialized to work correctly. However, they should be safe against being initialized multiple times in sequence. Similarly, they should be safe against being committed multiple times in sequence, where only the first commit will return an operation. The methods which actually perform work should check for proper initialization and throw an IllegalStateException in case they were not properly initialized previously.
Comment 1 Alexander Nyßen CLA 2015-09-03 03:38:38 EDT
Fixed that FXChangeViewportPolicy now properly follows that contract (up to now, it has thrown an exception when being committed multiple times).
Comment 2 Matthias Wienand CLA 2015-09-03 09:02:18 EDT
I guarded all transactional policies against being used uninitialized (throwing an IllegalStateException), and ensured that init() and commit() can be called multiple times in a row. The code is published on the master branch. Therefore, I resolve this ticket as fixed for 3.10.1RC3.