From 003531d1be38a2abd2b875452da1a752273576a2 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Thu, 14 Jun 2007 15:46:00 +0000
Subject: [PATCH] cleanup : suppress a few TODO comments by throwing exception and logging proper error message in case of unlikely failures.

---
 opends/src/server/org/opends/server/replication/protocol/ModifyMsg.java |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/protocol/ModifyMsg.java b/opends/src/server/org/opends/server/replication/protocol/ModifyMsg.java
index a8f1214..aff4180 100644
--- a/opends/src/server/org/opends/server/replication/protocol/ModifyMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/ModifyMsg.java
@@ -108,20 +108,16 @@
    * Get the byte array representation of this Message.
    *
    * @return The byte array representation of this Message.
+   *
+   * @throws UnsupportedEncodingException  When the encoding of the message
+   *         failed because the UTF-8 encoding is not supported.
    */
   @Override
-  public byte[] getBytes()
+  public byte[] getBytes() throws UnsupportedEncodingException
   {
     if (encodedMsg == null)
     {
-      try
-      {
-        encode();
-      } catch (UnsupportedEncodingException e)
-      {
-        // should never happens : TODO : log some error
-        return null;
-      }
+      encode();
     }
     return encodedMsg;
   }

--
Gitblit v1.10.0