Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-03-19 03:06:18 -0400
committerEike Stepper2013-03-19 03:06:18 -0400
commit91cb657a942da02218e5fe202b1539a421a4a5a9 (patch)
tree9cea6f6a1065a45392bc457121fd5ceb590a9336
parent394eeb0f8062e61fcbc56f14d44a72c7d45fce1f (diff)
downloadcdo-committers/estepper/emf-compare-proxies.tar.gz
cdo-committers/estepper/emf-compare-proxies.tar.xz
cdo-committers/estepper/emf-compare-proxies.zip
[402371] CDOCompareUtil.compare fails with models that use Containmentdrops/S20130319-0336committers/estepper/emf-compare-proxies
Proxies https://bugs.eclipse.org/bugs/show_bug.cgi?id=402371
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/revision/CDORevisionUtil.java14
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CommitIntegrityCheck.java10
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java16
3 files changed, 31 insertions, 9 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/revision/CDORevisionUtil.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/revision/CDORevisionUtil.java
index 60c15c4154..98a224d0b6 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/revision/CDORevisionUtil.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/revision/CDORevisionUtil.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.common.commit.CDOChangeSet;
import org.eclipse.emf.cdo.common.commit.CDOChangeSetData;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.id.CDOIDUtil;
+import org.eclipse.emf.cdo.common.id.CDOWithID;
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
import org.eclipse.emf.cdo.internal.common.commit.CDOChangeSetDataImpl;
@@ -339,7 +340,18 @@ public final class CDORevisionUtil
private static InternalCDORevision getParentRevision(InternalCDORevision revision, CDORevisionProvider provider)
{
- CDOID parentID = (CDOID)revision.getContainerID();
+ CDOID parentID;
+
+ Object containerID = revision.getContainerID();
+ if (containerID instanceof CDOWithID)
+ {
+ parentID = ((CDOWithID)containerID).cdoID();
+ }
+ else
+ {
+ parentID = (CDOID)containerID;
+ }
+
if (CDOIDUtil.isNull(parentID))
{
parentID = revision.getResourceID();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CommitIntegrityCheck.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CommitIntegrityCheck.java
index 2eab4eaf5c..3ecce96036 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CommitIntegrityCheck.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CommitIntegrityCheck.java
@@ -130,11 +130,7 @@ public class CommitIntegrityCheck
if (CDOIDUtil.isNull(containerOrResourceID))
{
- idOrObject = revision.getResourceID();
- if (idOrObject != null)
- {
- containerOrResourceID = (CDOID)transaction.convertObjectToID(idOrObject);
- }
+ containerOrResourceID = revision.getResourceID();
}
return containerOrResourceID;
@@ -182,8 +178,8 @@ public class CommitIntegrityCheck
// Nothing to be done. (I think...)
// @3
- CDOID currentResourceID = (CDOID)transaction.convertObjectToID(dirtyRev.getResourceID());
- CDOID cleanResourceID = (CDOID)transaction.convertObjectToID(cleanRev.getResourceID());
+ CDOID currentResourceID = dirtyRev.getResourceID();
+ CDOID cleanResourceID = cleanRev.getResourceID();
if (!CDOIDUtil.equals(currentResourceID, cleanResourceID))
{
if (currentResourceID != CDOID.NULL)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
index 25c6e5bee3..3aee00a423 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
@@ -24,11 +24,13 @@ import org.eclipse.emf.cdo.common.commit.CDOCommitInfoManager;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.id.CDOIDExternal;
import org.eclipse.emf.cdo.common.id.CDOIDUtil;
+import org.eclipse.emf.cdo.common.id.CDOWithID;
import org.eclipse.emf.cdo.common.model.CDOClassifierRef;
import org.eclipse.emf.cdo.common.model.CDOModelUtil;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.common.revision.CDOIDAndVersion;
import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionData;
import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
import org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDelta;
import org.eclipse.emf.cdo.common.revision.delta.CDOListFeatureDelta;
@@ -1062,7 +1064,19 @@ public abstract class AbstractCDOView extends CDOCommitHistoryProviderImpl<CDOOb
private String getResourcePath(InternalCDORevision revision)
{
- CDOID folderID = (CDOID)revision.data().getContainerID();
+ CDORevisionData data = revision.data();
+ CDOID folderID;
+
+ Object containerID = data.getContainerID();
+ if (containerID instanceof CDOWithID)
+ {
+ folderID = ((CDOWithID)containerID).cdoID();
+ }
+ else
+ {
+ folderID = (CDOID)containerID;
+ }
+
String name = (String)revision.data().get(EresourcePackage.Literals.CDO_RESOURCE_NODE__NAME, 0);
if (CDOIDUtil.isNull(folderID))
{

Back to the top