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

Bug 349526

Summary: CommitIntegrityCheck should use #equals when comparing OIDs
Product: [Modeling] EMF Reporter: Caspar D. <caspar_d>
Component: cdo.coreAssignee: Caspar D. <caspar_d>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: saulius.tvarijonas
Version: 4.1Flags: stepper: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch v1 none

Description Caspar D. CLA 2011-06-16 04:02:30 EDT
Currently there's some logic in CommitIntegrityCheck that 
compares CDOIDs by identity. This will usually work, but not
always. Should use CDOIDUtil.equals instead.
Comment 1 Caspar D. CLA 2011-06-16 04:03:15 EDT
[NoMagic note: SVR-3205]
Comment 2 Caspar D. CLA 2011-06-16 04:06:04 EDT
Created attachment 198069 [details]
Patch v1
Comment 3 Eike Stepper CLA 2011-07-02 04:37:46 EDT
Changing to 4.1 to ensure that the fix will "last". Please clone this bugzilla to 4.0 if you want a maintenance fix, too.
Comment 4 Eike Stepper CLA 2011-07-02 04:39:58 EDT
The patch looks okay. But I also still see code like this: if (currentContainerID != CDOID.NULL)

It'd be safer to use CDOIDUtil.isNull(id) instead. Please feel free to chnage thos plcaes, too, before you commit to *trunk* !
Comment 5 Caspar D. CLA 2011-07-04 00:47:43 EDT
Committed revision 8577 to trunk.
Comment 6 Caspar D. CLA 2011-07-04 01:14:09 EDT
Resolving to FIXED.
Comment 7 Caspar D. CLA 2011-07-04 01:42:00 EDT
Cloned as bug 351042
Comment 8 Eike Stepper CLA 2011-07-04 03:43:06 EDT
I can still see checks like "currentContainerID != CDOID.NULL" and from the context I can not see that currentContainerID!=null. Don't you think it's worth fixing that to "!CDOIDUtil.isNull(currentContainerID)"?
Comment 9 Eike Stepper CLA 2012-09-21 07:16:53 EDT
Closing.