Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Winkler2013-01-10 06:03:44 -0500
committerStefan Winkler2013-01-10 06:03:44 -0500
commit19fa21d2d5fe0b1e6df227d0f43d2c34ae719809 (patch)
tree99c0600a15380f9cf40961d8bbdadc3a4924dc3a
parentb899f55d75a91e78c3da5c7038cbe0810335df6e (diff)
downloadcdo-19fa21d2d5fe0b1e6df227d0f43d2c34ae719809.tar.gz
cdo-19fa21d2d5fe0b1e6df227d0f43d2c34ae719809.tar.xz
cdo-19fa21d2d5fe0b1e6df227d0f43d2c34ae719809.zip
390283: [DB] Incorrect handling of operations on unordered ELists
https://bugs.eclipse.org/bugs/show_bug.cgi?id=390283 Fixed off by one error
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AuditListTableMappingWithRanges.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/BranchingListTableMappingWithRanges.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AuditListTableMappingWithRanges.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AuditListTableMappingWithRanges.java
index c417b40431..7a3e49ba56 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AuditListTableMappingWithRanges.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AuditListTableMappingWithRanges.java
@@ -603,7 +603,7 @@ public class AuditListTableMappingWithRanges extends BasicAbstractListTableMappi
int toIdx = delta.getNewPosition();
// optimization: a move from the end of the list to an index that was just removed requires no shifting
- boolean optimizeMove = lastRemovedIndex != -1 && fromIdx == lastIndex - 1 && toIdx == lastRemovedIndex;
+ boolean optimizeMove = lastRemovedIndex != -1 && fromIdx == lastIndex && toIdx == lastRemovedIndex;
if (TRACER.isEnabled())
{
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/BranchingListTableMappingWithRanges.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/BranchingListTableMappingWithRanges.java
index 0e783b19a7..1a3838f11c 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/BranchingListTableMappingWithRanges.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/BranchingListTableMappingWithRanges.java
@@ -878,7 +878,7 @@ public class BranchingListTableMappingWithRanges extends BasicAbstractListTableM
int toIdx = delta.getNewPosition();
// optimization: a move from the end of the list to an index that was just removed requires no shifting
- boolean optimizeMove = lastRemovedIndex != -1 && fromIdx == lastIndex - 1 && toIdx == lastRemovedIndex;
+ boolean optimizeMove = lastRemovedIndex != -1 && fromIdx == lastIndex && toIdx == lastRemovedIndex;
if (TRACER.isEnabled())
{

Back to the top