From 7a34cefa2a5bbdf339f1a50b856e3d7441006b8d Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Wed, 08 Jun 2011 14:33:10 +0000
Subject: [PATCH] Fix OPENDJ-184: Transient errors when accessing cn=changelog DraftCN DB result in complete shutdown of the replication service

---
 opends/src/server/org/opends/server/replication/server/ReplicationData.java |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationData.java b/opends/src/server/org/opends/server/replication/server/ReplicationData.java
index 52022f9..867f052 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationData.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationData.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
- *      Portions Copyright 2010 ForgeRock AS.
+ *      Portions Copyright 2010-2011 ForgeRock AS.
  */
 package org.opends.server.replication.server;
 
@@ -47,16 +47,20 @@
    * Creates a new ReplicationData object from an UpdateMsg.
    *
    * @param change the UpdateMsg used to create the ReplicationData.
-   *
-   * @throws UnsupportedEncodingException When the encoding of the message
-   *         failed because the UTF-8 encoding is not supported.
    */
   public ReplicationData(UpdateMsg change)
-         throws UnsupportedEncodingException
   {
     // Always keep messages in the replication DB with the current protocol
     // version
-    this.setData(change.getBytes());
+    try
+    {
+      this.setData(change.getBytes());
+    }
+    catch (UnsupportedEncodingException e)
+    {
+      // This should not happen - UTF-8 is always available.
+      throw new RuntimeException(e);
+    }
   }
 
   /**

--
Gitblit v1.10.0