From 995c6d361fd75c7067957525d9d8f8055d7c16ee Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 02 Aug 2013 10:23:28 +0000
Subject: [PATCH] ReplicationDraftCNKey.java: Removed misleading comment. Added a comment about perfs. Inlined one local variable.
---
opends/src/server/org/opends/server/replication/server/ReplicationDraftCNKey.java | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationDraftCNKey.java b/opends/src/server/org/opends/server/replication/server/ReplicationDraftCNKey.java
index e672b81..741c497 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationDraftCNKey.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationDraftCNKey.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2009 Sun Microsystems, Inc.
- * Portions Copyright 2010-2011 ForgeRock AS.
+ * Portions Copyright 2010-2013 ForgeRock AS.
*/
package org.opends.server.replication.server;
@@ -32,7 +32,6 @@
import com.sleepycat.je.DatabaseEntry;
/**
- * Superclass of DatabaseEntry.
* Useful to create ReplicationServer keys from sequence numbers.
*/
public class ReplicationDraftCNKey extends DatabaseEntry
@@ -50,6 +49,7 @@
String s = String.valueOf(draftCN);
int a = 16-s.length();
String sscn = "0000000000000000".substring(0, a) + s;
+ // Should it use StaticUtils.getBytes() to increase performances?
this.setData(sscn.getBytes("UTF-8"));
} catch (UnsupportedEncodingException e)
{
@@ -65,7 +65,6 @@
public int getDraftCN()
{
String s = new String(this.getData());
- int i = Integer.valueOf(s);
- return i;
+ return Integer.valueOf(s);
}
}
--
Gitblit v1.10.0