Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346635 - Root resource gets deregistered on view.setBranchPoint()
Summary: Root resource gets deregistered on view.setBranchPoint()
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-20 06:40 EDT by Martin Fluegge CLA
Modified: 2011-06-23 03:39 EDT (History)
0 users

See Also:


Attachments
Test v1 (2.86 KB, patch)
2011-05-20 06:42 EDT, Martin Fluegge CLA
no flags Details | Diff

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