summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2011-04-28 04:37:31 (EDT)
committerCaspar De Groot2011-04-28 04:37:31 (EDT)
commitb603c7e573fd51bf20cb59a7403b9bc50d9f5483 (patch)
tree0117f7b59798b91cdbd7b4f217535110db022d7f
parent32eb7d2ac2344ed42baea8c3a612acea2d84844c (diff)
downloadcdo-b603c7e573fd51bf20cb59a7403b9bc50d9f5483.zip
cdo-b603c7e573fd51bf20cb59a7403b9bc50d9f5483.tar.gz
cdo-b603c7e573fd51bf20cb59a7403b9bc50d9f5483.tar.bz2
[Bug 344072] Reattachment registers object as DIRTY even when it's not
https://bugs.eclipse.org/bugs/show_bug.cgi?id=344072
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStateMachine.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStateMachine.java
index cce0b27..e710c1b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStateMachine.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStateMachine.java
@@ -677,15 +677,15 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
// Compute a revision delta and register it with the tx
CDORevision cleanRevision = revisionManager.getRevisionByVersion(id, revKey, -1, true);
CDORevisionDelta revisionDelta = revision.compare(cleanRevision);
- if (!revisionDelta.isEmpty())
+ if (revisionDelta.isEmpty())
{
- transaction.registerRevisionDelta(revisionDelta);
- transaction.registerDirty(object, (CDOFeatureDelta)null);
- changeState(object, CDOState.DIRTY);
+ changeState(object, CDOState.CLEAN);
}
else
{
- changeState(object, CDOState.CLEAN);
+ transaction.registerRevisionDelta(revisionDelta);
+ transaction.registerDirty(object, (CDOFeatureDelta)null);
+ changeState(object, CDOState.DIRTY);
}
// Add the object to the set of reattached objects