mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Chris Ridd
20.11.2013 c1a7e2cae728c5000124969eedc1dd701baa99b8
Fix OPENDJ-765 Modify with replace attr=value and delete attr gets misrecorded in ds-sync-hist
1 files modified
6 ■■■■ changed files
opends/src/server/org/opends/server/replication/plugin/AttrHistoricalSingle.java 6 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/AttrHistoricalSingle.java
@@ -23,7 +23,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011 ForgeRock AS
 *      Portions Copyright 2011-2013 ForgeRock AS
 */
package org.opends.server.replication.plugin;
@@ -102,6 +102,7 @@
    switch (mod.getModificationType())
    {
    case DELETE:
      this.addTime = null;
      this.deleteTime = changeNumber;
      this.value = newValue;
      lastMod = HistAttrModificationKey.DEL;
@@ -117,7 +118,9 @@
      if (newValue == null)
      {
        // REPLACE with null value is actually a DELETE
        this.addTime = null;
        this.deleteTime = changeNumber;
        this.value = null;
        lastMod = HistAttrModificationKey.DEL;
      }
      else
@@ -260,6 +263,7 @@
      {
        if (newValue == null)
        {
          addTime = null;
          value = newValue;
          deleteTime = changeNumber;
          lastMod = HistAttrModificationKey.DEL;