From 7a0b4fed1cfa0934091355444cc4bc2fb48997ac Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 05 Nov 2015 12:25:28 +0000
Subject: [PATCH] OPENDJ-1802 Make ByteSequenceReader methods more intentional

---
 opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/ByteArrayScanner.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/ByteArrayScanner.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/ByteArrayScanner.java
index 94d889b..7323c98 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/ByteArrayScanner.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/ByteArrayScanner.java
@@ -20,7 +20,7 @@
  *
  * CDDL HEADER END
  *
- *      Copyright 2014 ForgeRock AS
+ *      Copyright 2014-2015 ForgeRock AS
  */
 package org.opends.server.replication.protocol;
 
@@ -87,7 +87,7 @@
   {
     try
     {
-      return bytes.get();
+      return bytes.readByte();
     }
     catch (IndexOutOfBoundsException e)
     {
@@ -106,7 +106,7 @@
   {
     try
     {
-      return bytes.getShort();
+      return bytes.readShort();
     }
     catch (IndexOutOfBoundsException e)
     {
@@ -125,7 +125,7 @@
   {
     try
     {
-      return bytes.getInt();
+      return bytes.readInt();
     }
     catch (IndexOutOfBoundsException e)
     {
@@ -144,7 +144,7 @@
   {
     try
     {
-      return bytes.getLong();
+      return bytes.readLong();
     }
     catch (IndexOutOfBoundsException e)
     {
@@ -190,7 +190,7 @@
       final int offset = findZeroSeparator();
       if (offset > 0)
       {
-        final String s = bytes.getString(offset);
+        final String s = bytes.readStringUtf8(offset);
         skipZeroSeparator();
         return s;
       }
@@ -254,7 +254,7 @@
   {
     try
     {
-      return CSN.valueOf(bytes.getByteSequence(CSN.BYTE_ENCODING_LENGTH));
+      return CSN.valueOf(bytes.readByteSequence(CSN.BYTE_ENCODING_LENGTH));
     }
     catch (IndexOutOfBoundsException e)
     {

--
Gitblit v1.10.0