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

Bug 346635

Summary: Root resource gets deregistered on view.setBranchPoint()
Product: [Modeling] EMF Reporter: Martin Fluegge <martin.fluegge>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3    
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test v1 none

Description Martin Fluegge CLA 2011-05-20 06:40:05 EDT
When the root resource is unregistered in AbstractCDOView the related reference will be set to *null*. This can lead to trouble if the user stored this references and moves backwards to time line to retrieve older versions of the repository. In this case the root resource pointer should not change.
Comment 1 Martin Fluegge CLA 2011-05-20 06:42:15 EDT
Created attachment 196199 [details]
Test v1

Attached a test to demonstrate the problem.
Comment 2 Eike Stepper CLA 2011-05-23 13:13:34 EDT
The method AbstractCDOView.clearRootResource() has been introduced in bug 280102 and tested with Bugzilla_280102_Test.testRootResourceInReadOnlyView(). All that was historically before the root resource got created and persisted during the initial system commit, see Repository.initRootResource().

Now we can safely remove AbstractCDOView.clearRootResource()...
Comment 3 Eike Stepper CLA 2011-05-23 13:25:27 EDT
Committed revision 7823:
- trunk/releng/org.eclipse.emf.cdo.releng
Comment 4 Eike Stepper CLA 2011-05-23 13:37:02 EDT
Resolved
Comment 5 Eike Stepper CLA 2011-06-23 03:39:21 EDT
Available in R20110608-1407