Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-11-13 16:49:08 +0000
committerEike Stepper2010-11-13 16:49:08 +0000
commit63f895897f9e3dede1b6c62a677f9d4a9ad0ddc9 (patch)
treebb760faa428413651138dbfdcb1cd53e9f11201a /plugins/org.eclipse.emf.cdo.location
parentdcb4d96bfe91bf414fbea3a77d538871e87bbd40 (diff)
downloadcdo-63f895897f9e3dede1b6c62a677f9d4a9ad0ddc9.tar.gz
cdo-63f895897f9e3dede1b6c62a677f9d4a9ad0ddc9.tar.xz
cdo-63f895897f9e3dede1b6c62a677f9d4a9ad0ddc9.zip
[330067] CDO Repository view expanding repository connection results in exception
https://bugs.eclipse.org/bugs/show_bug.cgi?id=330067
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.location')
-rw-r--r--plugins/org.eclipse.emf.cdo.location/src/org/eclipse/emf/cdo/internal/location/BranchCheckoutSource.java25
1 files changed, 14 insertions, 11 deletions
diff --git a/plugins/org.eclipse.emf.cdo.location/src/org/eclipse/emf/cdo/internal/location/BranchCheckoutSource.java b/plugins/org.eclipse.emf.cdo.location/src/org/eclipse/emf/cdo/internal/location/BranchCheckoutSource.java
index 4a05f0fdef..576722935a 100644
--- a/plugins/org.eclipse.emf.cdo.location/src/org/eclipse/emf/cdo/internal/location/BranchCheckoutSource.java
+++ b/plugins/org.eclipse.emf.cdo.location/src/org/eclipse/emf/cdo/internal/location/BranchCheckoutSource.java
@@ -66,22 +66,25 @@ public class BranchCheckoutSource extends Container<BranchCheckoutSource> implem
{
if (subBranches == null)
{
+ subBranches = new ArrayList<BranchCheckoutSource>();
+
CDOSessionConfiguration config = getRepositoryLocation().createSessionConfiguration();
CDOSession session = config.openSession();
-
- try
+ if (session.getRepositoryInfo().isSupportingBranches())
{
- CDOBranch branch = session.getBranchManager().getBranch(getBranchPath());
- CDOBranch[] branches = branch.getBranches();
- subBranches = new ArrayList<BranchCheckoutSource>();
- for (CDOBranch subBranch : branches)
+ try
{
- subBranches.add(new BranchCheckoutSource(this, subBranch.getName()));
+ CDOBranch branch = session.getBranchManager().getBranch(getBranchPath());
+ CDOBranch[] branches = branch.getBranches();
+ for (CDOBranch subBranch : branches)
+ {
+ subBranches.add(new BranchCheckoutSource(this, subBranch.getName()));
+ }
+ }
+ finally
+ {
+ IOUtil.close(session);
}
- }
- finally
- {
- IOUtil.close(session);
}
}

Back to the top