From 7c3cd18d9546c9243979504243538a6c75619bbe Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 17 Aug 2015 08:38:24 +0000
Subject: [PATCH] Fix incorrect error message in replication

---
 opendj-server-legacy/src/messages/org/opends/messages/replication_de.properties       |    4 ++--
 opendj-server-legacy/src/messages/org/opends/messages/replication_ja.properties       |    4 ++--
 opendj-server-legacy/src/messages/org/opends/messages/replication.properties          |    6 +++---
 opendj-server-legacy/src/messages/org/opends/messages/replication_zh_CN.properties    |    1 -
 opendj-server-legacy/src/messages/org/opends/messages/replication_es.properties       |    4 ++--
 opendj-server-legacy/src/messages/org/opends/messages/replication_fr.properties       |    4 ++--
 opendj-server-legacy/src/main/java/org/opends/server/replication/server/MsgQueue.java |   18 +++++-------------
 7 files changed, 16 insertions(+), 25 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/server/MsgQueue.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/server/MsgQueue.java
index 42127db..fb8b3f8 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/server/MsgQueue.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/server/MsgQueue.java
@@ -26,9 +26,9 @@
  */
 package org.opends.server.replication.server;
 
-import org.forgerock.i18n.slf4j.LocalizedLogger;
 import java.util.TreeMap;
 
+import org.forgerock.i18n.slf4j.LocalizedLogger;
 import org.opends.server.replication.common.CSN;
 import org.opends.server.replication.protocol.UpdateMsg;
 
@@ -41,7 +41,6 @@
  */
 public class MsgQueue
 {
-
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
   private TreeMap<CSN, UpdateMsg> map = new TreeMap<>();
@@ -109,7 +108,6 @@
     }
   }
 
-
   /**
    * Add an UpdateMsg to this MessageQueue.
    *
@@ -128,10 +126,9 @@
               || msgSameCSN.isAssured() != update.isAssured()
               || msgSameCSN.getVersion() != update.getVersion())
           {
-            // Adding 2 msgs with the same CSN is ok only when
-            // the 2 msgs are the same
+            // Adding 2 msgs with the same CSN is ok only when the 2 msgs are the same
             bytesCount += update.size() - msgSameCSN.size();
-            logger.error(ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN, msgSameCSN.getCSN(), msgSameCSN, update);
+            logger.error(ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CSN, msgSameCSN.getCSN(), msgSameCSN, update);
           }
         }
         catch (Exception e)
@@ -179,7 +176,6 @@
    *
    * @return <tt>true</tt> if this map contains an UpdateMsg
    *         with the same CSN as the given UpdateMsg.
-   *
    */
   public boolean contains(UpdateMsg msg)
   {
@@ -189,9 +185,7 @@
     }
   }
 
-  /**
-   * Removes all UpdateMsg form this queue.
-   */
+  /** Removes all UpdateMsg form this queue. */
   public void clear()
   {
     synchronized (lock)
@@ -228,11 +222,9 @@
     while (!finalCSN.equals(msg.getCSN()));
   }
 
-  /** {@inheritDoc} */
   @Override
   public String toString()
   {
-    return getClass().getSimpleName() + " bytesCount=" + bytesCount + " queue="
-        + map.values();
+    return getClass().getSimpleName() + " bytesCount=" + bytesCount + " queue=" + map.values();
   }
 }
diff --git a/opendj-server-legacy/src/messages/org/opends/messages/replication.properties b/opendj-server-legacy/src/messages/org/opends/messages/replication.properties
index e09ee61..36b3de3 100644
--- a/opendj-server-legacy/src/messages/org/opends/messages/replication.properties
+++ b/opendj-server-legacy/src/messages/org/opends/messages/replication.properties
@@ -20,7 +20,7 @@
 # CDDL HEADER END
 #
 #      Copyright 2006-2010 Sun Microsystems, Inc.
-#      Portions Copyright 2011-2014 ForgeRock AS
+#      Portions Copyright 2011-2015 ForgeRock AS
 #
 #
 # This file contains the primary Directory Server configuration.  It must not
@@ -352,8 +352,8 @@
 NOTE_RESENDING_INIT_TARGET_199=\
  Resending a new initialization start for an initialization of a remote server \
  due to the root error : %s
-ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=Processing two different \
- changes with same changeNumber=%s. Previous msg=<%s>, New msg=<%s>
+ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CSN_201=Processing two different \
+ changes with same CSN=%s. Previous msg=<%s>, New msg=<%s>
 ERR_COULD_NOT_SOLVE_CONFLICT_202=Error while trying to solve conflict \
  with DN : %s ERROR : %s
 NOTE_MONITOR_DATA_RECEIVED_203=Monitor data for the domain "%s" has been \
diff --git a/opendj-server-legacy/src/messages/org/opends/messages/replication_de.properties b/opendj-server-legacy/src/messages/org/opends/messages/replication_de.properties
index 1bdf2c8..aa10a13 100644
--- a/opendj-server-legacy/src/messages/org/opends/messages/replication_de.properties
+++ b/opendj-server-legacy/src/messages/org/opends/messages/replication_de.properties
@@ -20,7 +20,7 @@
 # CDDL HEADER END
 #
 #      Copyright 2006-2010 Sun Microsystems, Inc.
-#      Portions Copyright 2011-2014 ForgeRock AS
+#      Portions Copyright 2011-2015 ForgeRock AS
 #
 #
 # This file contains the primary Directory Server configuration.  It must not
@@ -183,6 +183,6 @@
 ERR_SENDING_NEW_ATTEMPT_INIT_REQUEST_197=Beim Senden einer neuen Initialisierungsanforderung von einem Remote-Server ist folgender Fehler aufgetreten %s. Der erste Fehler war: %s
 NOTE_RESENDING_INIT_FROM_REMOTE_REQUEST_198=Aufgrund des Root-Fehlers %s wird erneut eine neue Initialisierungsanforderung f\u00fcr eine Initialisierung von einem Remote-Server gesendet
 NOTE_RESENDING_INIT_TARGET_199=Aufgrund des Root-Fehlers %s wird erneut eine neue Initialisierungsanforderung f\u00fcr eine Initialisierung eines Remote-Servers gesendet
-ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=Verarbeitung von zwei verschiedenen \u00c4nderungen mit derselben changeNumber=%s. Vorherige msg=<%s>, Neue msg=<%s>
+ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CSN_201=Verarbeitung von zwei verschiedenen \u00c4nderungen mit derselben CSN=%s. Vorherige msg=<%s>, Neue msg=<%s>
 ERR_COULD_NOT_SOLVE_CONFLICT_202=Fehler beim Versuch, Konflikt mit DN zu l\u00f6sen: %s FEHLER : %s
 NOTE_ECL_LOOKTHROUGH_LIMIT_EXCEEDED_238=Bei diesem Suchvorgang wurden maximal %d Eintr\u00e4ge auf \u00dcbereinstimmungen \u00fcberpr\u00fcft
diff --git a/opendj-server-legacy/src/messages/org/opends/messages/replication_es.properties b/opendj-server-legacy/src/messages/org/opends/messages/replication_es.properties
index 0d49886..5fee496 100644
--- a/opendj-server-legacy/src/messages/org/opends/messages/replication_es.properties
+++ b/opendj-server-legacy/src/messages/org/opends/messages/replication_es.properties
@@ -20,7 +20,7 @@
 # CDDL HEADER END
 #
 #      Copyright 2006-2010 Sun Microsystems, Inc.
-#      Portions Copyright 2011-2014 ForgeRock AS
+#      Portions Copyright 2011-2015 ForgeRock AS
 #
 #
 # This file contains the primary Directory Server configuration.  It must not
@@ -183,6 +183,6 @@
 ERR_SENDING_NEW_ATTEMPT_INIT_REQUEST_197=Al enviar una nueva solicitud de reinicializaci\u00f3n para una inicializaci\u00f3n desde un servidor remoto, se ha producido el siguiente error: %s. El error inicial fue: %s
 NOTE_RESENDING_INIT_FROM_REMOTE_REQUEST_198=Se est\u00e1 enviando una nueva solicitud de inicializaci\u00f3n para una inicializaci\u00f3n de un servidor remoto debido al error ra\u00edz: %s
 NOTE_RESENDING_INIT_TARGET_199=Se est\u00e1 reenviando un nuevo inicio de inicializaci\u00f3n para una inicializaci\u00f3n de un servidor remoto debido al error ra\u00edz: %s
-ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=Procesando dos cambios diferentes con el mismo n\u00famero de cambio changeNumber=%s. Anterior msg=<%s>, Nuevo msg=<%s>
+ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CSN_201=Procesando dos cambios diferentes con el mismo n\u00famero de cambio CSN=%s. Anterior msg=<%s>, Nuevo msg=<%s>
 ERR_COULD_NOT_SOLVE_CONFLICT_202=Error al tratar de solucionar el conflicto con DN: %s ERROR : %s
 NOTE_ECL_LOOKTHROUGH_LIMIT_EXCEEDED_238=Esta operaci\u00f3n de b\u00fasqueda ha comprobado el m\u00e1ximo de %d entradas que coinciden
diff --git a/opendj-server-legacy/src/messages/org/opends/messages/replication_fr.properties b/opendj-server-legacy/src/messages/org/opends/messages/replication_fr.properties
index 9df4def..d5fcb7b 100644
--- a/opendj-server-legacy/src/messages/org/opends/messages/replication_fr.properties
+++ b/opendj-server-legacy/src/messages/org/opends/messages/replication_fr.properties
@@ -20,7 +20,7 @@
 # CDDL HEADER END
 #
 #      Copyright 2006-2010 Sun Microsystems, Inc.
-#      Portions Copyright 2011-2014 ForgeRock AS
+#      Portions Copyright 2011-2015 ForgeRock AS
 #
 #
 # This file contains the primary Directory Server configuration.  It must not
@@ -183,7 +183,7 @@
 ERR_SENDING_NEW_ATTEMPT_INIT_REQUEST_197=L'erreur suivante s'est produite %s lors de l'envoi d'une nouvelle requ\u00eate d'initialisation pour une initialisation \u00e0 partir d'un serveur distant. L'erreur initiale \u00e9tait\u00a0: %s
 NOTE_RESENDING_INIT_FROM_REMOTE_REQUEST_198=Renvoi d'une nouvelle requ\u00eate d'initialisation pour une initialisation \u00e0 partir d'un serveur distant en raison de l'erreur racine\u00a0: %s
 NOTE_RESENDING_INIT_TARGET_199=Renvoi d'un nouveau d\u00e9marrage d'initialisation pour l'initialisation d'un serveur distant en raison de l'erreur racine\u00a0: %s
-ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=Traitement de deux modifications diff\u00e9rentes ayant le m\u00eame param\u00e8tre changeNumber=%s. Pr\u00e9c\u00e9dent msg=<%s>, Nouveau msg=<%s>
+ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CSN_201=Traitement de deux modifications diff\u00e9rentes ayant le m\u00eame param\u00e8tre CSN=%s. Pr\u00e9c\u00e9dent msg=<%s>, Nouveau msg=<%s>
 ERR_COULD_NOT_SOLVE_CONFLICT_202=Une erreur est survenue lors de la tentative de r\u00e9solution d'un conflit avec le DN\u00a0: %s ERREUR : %s
 NOTE_ECL_LOOKTHROUGH_LIMIT_EXCEEDED_238=Cette op\u00e9ration de recherche a v\u00e9rifi\u00e9 le maximum d'entr\u00e9es %d \u00e0 des fins de correspondance
 NOTE_SEARCH_CHANGELOG_INSUFFICIENT_PRIVILEGES_285=Vous ne disposez pas du privil\u00e8ge de lecture sur cn=changelog
diff --git a/opendj-server-legacy/src/messages/org/opends/messages/replication_ja.properties b/opendj-server-legacy/src/messages/org/opends/messages/replication_ja.properties
index 775b3a6..c89df7d 100644
--- a/opendj-server-legacy/src/messages/org/opends/messages/replication_ja.properties
+++ b/opendj-server-legacy/src/messages/org/opends/messages/replication_ja.properties
@@ -20,7 +20,7 @@
 # CDDL HEADER END
 #
 #      Copyright 2006-2010 Sun Microsystems, Inc.
-#      Portions Copyright 2011-2014 ForgeRock AS
+#      Portions Copyright 2011-2015 ForgeRock AS
 #
 #
 # This file contains the primary Directory Server configuration.  It must not
@@ -181,6 +181,6 @@
 ERR_SENDING_NEW_ATTEMPT_INIT_REQUEST_197=\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u306e\u521d\u671f\u5316\u7528\u306e\u65b0\u3057\u3044\u521d\u671f\u5316\u8981\u6c42\u306e\u9001\u4fe1\u6642\u306b\u3001\u6b21\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f %s\u3002\u6700\u521d\u306e\u30a8\u30e9\u30fc: %s
 NOTE_RESENDING_INIT_FROM_REMOTE_REQUEST_198=\u30eb\u30fc\u30c8\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u305f\u3081\u3001\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u306e\u521d\u671f\u5316\u7528\u306e\u65b0\u3057\u3044\u521d\u671f\u5316\u8981\u6c42\u3092\u518d\u9001\u3057\u3066\u3044\u307e\u3059: %s
 NOTE_RESENDING_INIT_TARGET_199=\u30eb\u30fc\u30c8\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u305f\u3081\u3001\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u306e\u521d\u671f\u5316\u7528\u306e\u65b0\u3057\u3044\u521d\u671f\u5316\u306e\u958b\u59cb\u3092\u518d\u9001\u3057\u3066\u3044\u307e\u3059: %s
-ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=2 \u3064\u306e\u7570\u306a\u308b\u5909\u66f4\u3092\u540c\u3058 changeNumber=%s \u3067\u51e6\u7406\u3057\u3066\u3044\u307e\u3059\u3002\u4ee5\u524d\u306e msg=<%s>\u3001\u65b0\u3057\u3044 msg=<%s>
+ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CSN_201=2 \u3064\u306e\u7570\u306a\u308b\u5909\u66f4\u3092\u540c\u3058 CSN=%s \u3067\u51e6\u7406\u3057\u3066\u3044\u307e\u3059\u3002\u4ee5\u524d\u306e msg=<%s>\u3001\u65b0\u3057\u3044 msg=<%s>
 ERR_COULD_NOT_SOLVE_CONFLICT_202=DN \u306e\u7af6\u5408\u3092\u89e3\u6c7a\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f : %s \u30a8\u30e9\u30fc : %s
 NOTE_ECL_LOOKTHROUGH_LIMIT_EXCEEDED_238=\u3053\u306e\u691c\u7d22\u64cd\u4f5c\u306f\u3001\u6700\u5927\u6570\u3067\u3042\u308b %d \u500b\u306e\u4e00\u81f4\u30a8\u30f3\u30c8\u30ea\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f
diff --git a/opendj-server-legacy/src/messages/org/opends/messages/replication_zh_CN.properties b/opendj-server-legacy/src/messages/org/opends/messages/replication_zh_CN.properties
index dacff26..1abfe55 100644
--- a/opendj-server-legacy/src/messages/org/opends/messages/replication_zh_CN.properties
+++ b/opendj-server-legacy/src/messages/org/opends/messages/replication_zh_CN.properties
@@ -180,6 +180,5 @@
 ERR_SENDING_NEW_ATTEMPT_INIT_REQUEST_197=\u53d1\u9001\u9488\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u521d\u59cb\u5316\u7684\u65b0\u521d\u59cb\u5316\u8bf7\u6c42\u65f6\uff0c\u53d1\u751f\u4ee5\u4e0b\u9519\u8bef %s\u3002\u521d\u59cb\u9519\u8bef\u4e3a: %s
 NOTE_RESENDING_INIT_FROM_REMOTE_REQUEST_198=\u7531\u4e8e\u8d85\u7ea7\u7528\u6237\u9519\u8bef\uff0c\u91cd\u65b0\u53d1\u9001\u9488\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u521d\u59cb\u5316\u7684\u65b0\u521d\u59cb\u5316\u8bf7\u6c42: %s
 NOTE_RESENDING_INIT_TARGET_199=\u7531\u4e8e\u8d85\u7ea7\u7528\u6237\u9519\u8bef\uff0c\u91cd\u65b0\u53d1\u9001\u9488\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u521d\u59cb\u5316\u7684\u65b0\u521d\u59cb\u5316\u5f00\u59cb: %s
-ERR_RSQUEUE_DIFFERENT_MSGS_WITH_SAME_CN_201=\u7528\u76f8\u540c\u7684\u66f4\u6539\u53f7=%s \u6765\u5904\u7406\u4e24\u4e2a\u4e0d\u540c\u7684\u66f4\u6539\u3002\u4ee5\u524d\u7684 msg=<%s>\uff0c\u65b0\u7684 msg=<%s>
 ERR_COULD_NOT_SOLVE_CONFLICT_202=\u5c1d\u8bd5\u89e3\u51b3\u4e0e DN %s \u7684\u51b2\u7a81\u65f6\u51fa\u73b0\u9519\u8bef\uff1a\u9519\u8bef %s
 NOTE_ECL_LOOKTHROUGH_LIMIT_EXCEEDED_238=\u8be5\u641c\u7d22\u64cd\u4f5c\u68c0\u67e5\u4e86 %d\uff08\u6700\u5927\u503c\uff09\u4e2a\u6761\u76ee\u4ee5\u83b7\u53d6\u5339\u914d\u9879

--
Gitblit v1.10.0