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

Bug 342130

Summary: CDOListFeatureDeltaImpl.cleanupWithNewDelta does not properly adjust SET delta
Product: [Modeling] EMF Reporter: Caspar D. <caspar_d>
Component: cdo.coreAssignee: Pascal Lehmann <pascal.lehmann>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: cyril.jaquier, pascal.lehmann, saulius.tvarijonas
Version: 4.0Flags: stepper: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Testcase (as a patch)
none
Patch v1 none

Description Caspar D. CLA 2011-04-07 06:15:13 EDT
See summary. SET deltas don't get adjusted. Committing a tx with such
a SET delta that should have been adjusted, gives, as one might expect,
and IndexOutOfBoundsEx.

Testcase coming up.
Comment 1 Caspar D. CLA 2011-04-07 06:16:28 EDT
NoMagic internal note: SVR-2684
Comment 2 Caspar D. CLA 2011-04-07 06:20:47 EDT
Created attachment 192715 [details]
Testcase (as a patch)
Comment 3 Pascal Lehmann CLA 2011-04-07 06:58:50 EDT
Created attachment 192721 [details]
Patch v1

Looks as if the SET case was missing.
Comment 4 Caspar D. CLA 2011-04-07 07:10:33 EDT
Now that's a fast response!

Thanks Pascal :-)
Comment 5 Eike Stepper CLA 2011-04-09 05:02:52 EDT
Looks good. Incredible that this hasn't been recognized earlier...
Comment 6 Pascal Lehmann CLA 2011-04-11 02:52:28 EDT
Committed revision 7606:
- trunk/plugins/org.eclipse.emf.cdo.common
- trunk/plugins/org.eclipse.emf.cdo.tests
Comment 7 Pascal Lehmann CLA 2011-04-11 02:58:23 EDT
(In reply to comment #5)
> Looks good. Incredible that this hasn't been recognized earlier...

I suspect not many have been using the set operation on the list together with an add/remove which needed adjusting the index.
Still, I hope this is the last fix for indices we need to make ;)

Committed Testcase and Patch v1.
Comment 8 Eike Stepper CLA 2011-06-23 03:42:28 EDT
Available in R20110608-1407