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

Bug 314298

Summary: MEMStore is too tolerant against with branch creation if branching is not enabled
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: minor    
Priority: P3    
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Eike Stepper CLA 2010-05-25 11:55:39 EDT
With MEMstore branches can even be created if branching support is disabled in the repository.
Comment 1 Eike Stepper CLA 2010-05-25 11:57:16 EDT
Adding a check in Repository.java:

  public int createBranch(int branchID, BranchInfo branchInfo)
  {
    if (!isSupportingBranches())
    {
      throw new IllegalStateException("Branching is not supported by " + this);
    }

    synchronized (createBranchLock)
    {
      IStoreAccessor accessor = StoreThreadLocal.getAccessor();
      return accessor.createBranch(branchID, branchInfo);
    }
  }
Comment 2 Eike Stepper CLA 2010-05-25 12:01:16 EDT
Committed to HEAD
Comment 3 Eike Stepper CLA 2010-05-25 12:01:41 EDT
Reopen for changing assignee
Comment 4 Eike Stepper CLA 2010-05-25 12:02:05 EDT
Assignee changed
Comment 5 Eike Stepper CLA 2010-06-29 04:36:19 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/