Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342130 - CDOListFeatureDeltaImpl.cleanupWithNewDelta does not properly adjust SET delta
Summary: CDOListFeatureDeltaImpl.cleanupWithNewDelta does not properly adjust SET delta
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Pascal Lehmann CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 06:15 EDT by Caspar D. CLA
Modified: 2011-06-23 03:42 EDT (History)
3 users (show)

See Also:
stepper: review+


Attachments
Testcase (as a patch) (2.54 KB, patch)
2011-04-07 06:20 EDT, Caspar D. CLA
no flags Details | Diff
Patch v1 (839 bytes, patch)
2011-04-07 06:58 EDT, Pascal Lehmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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