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/DeleteMsg.java | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/DeleteMsg.java b/opends/src/server/org/opends/server/replication/protocol/DeleteMsg.java
index 0669ab6..cea0321 100644
--- a/opends/src/server/org/opends/server/replication/protocol/DeleteMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/DeleteMsg.java
@@ -103,18 +103,14 @@
* 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
{
- try
- {
- return encodeHeader(MSG_TYPE_DELETE_REQUEST, 0);
- } catch (UnsupportedEncodingException e)
- {
- // should never happen : TODO : log error properly
- return null;
- }
+ return encodeHeader(MSG_TYPE_DELETE_REQUEST, 0);
}
/**
--
Gitblit v1.10.0