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

Bug 333451

Summary: CommitIntegrityCheck throws NPE for references to TRANSIENT objects
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.0Flags: stepper: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Testcases (as a patch)
none
Patch including testcases
none
Patch v2 - ready to be committed none

Description Caspar D. CLA 2011-01-04 04:16:06 EST
If a CommitIntegrityCheck (i.e. the check for partial commits)
encounters an object that references a TRANSIENT object, an 
NPE follows because it fails to take into account that a TRANSIENT
object returns null from cdoID().

The fix is not to detect the dangling reference, but to silently
ignore it, because for detection of dangling references we
have other logic: AbstractCDOView.provideCDOID(*) on the client
side, and the stuff controlled with 
IRepository.Props.ENSURE_REFERENTIAL_INTEGRITY
on the server side.
Comment 1 Caspar D. CLA 2011-01-04 22:18:41 EST
Created attachment 186067 [details]
Testcases (as a patch)
Comment 2 Caspar D. CLA 2011-01-04 23:40:47 EST
Created attachment 186068 [details]
Patch including testcases
Comment 3 Eike Stepper CLA 2011-01-05 06:35:50 EST
Created attachment 186085 [details]
Patch v2 - ready to be committed

I've moved the integrity check class to internal
Comment 4 Caspar D. CLA 2011-01-06 01:48:24 EST
Committed to HEAD
Comment 5 Eike Stepper CLA 2011-06-23 03:41:06 EDT
Available in R20110608-1407