summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-07 00:32:45 (EDT)
committerEike Stepper2007-10-07 00:32:45 (EDT)
commit2ef7765ce8833e54ed71cd46f783b9780fd677ed (patch)
tree4a224b9910689c09cfc7fdff34860955c3fea2db
parent0dde6f02d92f0f2519921b7e457ae99fdeb3101a (diff)
downloadcdo-2ef7765ce8833e54ed71cd46f783b9780fd677ed.zip
cdo-2ef7765ce8833e54ed71cd46f783b9780fd677ed.tar.gz
cdo-2ef7765ce8833e54ed71cd46f783b9780fd677ed.tar.bz2
[205652] Prevent duplicate resources
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205652
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java6
2 files changed, 8 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
index 4728355..c8478c4 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
@@ -22,7 +22,9 @@ import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.model.CDOPackage;
import org.eclipse.emf.cdo.protocol.util.TransportException;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.internal.cdo.bundle.OM;
@@ -139,6 +141,12 @@ public class CDOTransactionImpl extends CDOViewImpl implements CDOTransaction
return CDOIDImpl.create(id);
}
+ public CDOResource createResource(String path)
+ {
+ URI createURI = CDOUtil.createResourceURI(path);
+ return (CDOResource)getResourceSet().createResource(createURI);
+ }
+
public void commit()
{
checkWritable();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
index fb36b00..2466c37 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
@@ -165,12 +165,6 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
throw new ReadOnlyException("CDO view is read only: " + this);
}
- public CDOResource createResource(String path)
- {
- URI createURI = CDOUtil.createResourceURI(path);
- return (CDOResource)getResourceSet().createResource(createURI);
- }
-
public CDOResource getResource(String path)
{
URI uri = CDOUtil.createResourceURI(path);