Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2018-01-31 10:54:54 -0500
committerEike Stepper2018-01-31 10:54:54 -0500
commitfcd47ce88ec98102ee900cdcefe9ba607668cef5 (patch)
tree0df7a0c2601f0b3c9b7e1a00e3a6d92c3bd247c6 /plugins/org.eclipse.emf.cdo.tests/src
parent2e4d39296a8bf0a7ad691e3cee879b8cc196ec92 (diff)
downloadcdo-fcd47ce88ec98102ee900cdcefe9ba607668cef5.tar.gz
cdo-fcd47ce88ec98102ee900cdcefe9ba607668cef5.tar.xz
cdo-fcd47ce88ec98102ee900cdcefe9ba607668cef5.zip
[530498] Handle reattached elements in RewriteTransition
When the CDOUndoDetector detects an undo dirty elements are removed from dirty object, their state is set from DIRTY to CLEAN but they also need to be removed from reattached/detached objects, otherwise this could later lead to IllegalStateException if CDOTransaction.rollback is called (their is no more revision in CDOTransactionImpl.cleanRevisions for an element known in detachedObjects). https://bugs.eclipse.org/bugs/show_bug.cgi?id=530498 Change-Id: Ib77ac7e72bec165ecac9faf05590385e1d77ec06 Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr> Signed-off-by: Eike Stepper <stepper@esc-net.de>
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests/src')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_530498_Test.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_530498_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_530498_Test.java
index 8b0e22e1cd..d19b8d2c56 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_530498_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_530498_Test.java
@@ -78,14 +78,14 @@ public class Bugzilla_530498_Test extends AbstractCDOTest
// cancellation of the "Remove" step will do nothing).
company1.getCustomers().add(customer);
- assertFalse(transaction.getDirtyObjects().containsKey(customerID));
+ assertEquals(isConfig(LEGACY), transaction.getDirtyObjects().containsKey(customerID));
assertFalse(transaction.getDirtyObjects().containsKey(company1ID));
assertFalse(transaction.getDirtyObjects().containsKey(company2ID));
assertFalse(transaction.getDetachedObjects().containsKey(customerID));
assertFalse(transaction.getLastSavepoint().getAllDetachedObjects().containsKey(customerID));
- assertFalse(transaction.getLastSavepoint().getDetachedObjects().containsKey(customerID));
- assertFalse(transaction.getLastSavepoint().getReattachedObjects().containsKey(customerID));
+ assertEquals(isConfig(LEGACY), transaction.getLastSavepoint().getDetachedObjects().containsKey(customerID));
+ assertEquals(isConfig(LEGACY), transaction.getLastSavepoint().getReattachedObjects().containsKey(customerID));
// Rollback the transaction
transaction.rollback();

Back to the top