Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333451 - CommitIntegrityCheck throws NPE for references to TRANSIENT objects
Summary: CommitIntegrityCheck throws NPE for references to TRANSIENT objects
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: Caspar D. CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-04 04:16 EST by Caspar D. CLA
Modified: 2011-06-23 03:41 EDT (History)
1 user (show)

See Also:
stepper: review+


Attachments
Testcases (as a patch) (6.45 KB, patch)
2011-01-04 22:18 EST, Caspar D. CLA
no flags Details | Diff
Patch including testcases (12.49 KB, patch)
2011-01-04 23:40 EST, Caspar D. CLA
no flags Details | Diff
Patch v2 - ready to be committed (41.11 KB, patch)
2011-01-05 06:35 EST, Eike Stepper 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-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