You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2021/06/11 19:56:35 UTC

[qpid-protonj2] 01/02: PROTON-2394 Fix a few minor wording issues in the buffer API

This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git

commit 0e69665efc978309ccbcfe6820c5ae6418e510bb
Author: Timothy Bish <ta...@gmail.com>
AuthorDate: Fri Jun 11 14:56:57 2021 -0400

    PROTON-2394 Fix a few minor wording issues in the buffer API
---
 .../java/org/apache/qpid/protonj2/buffer/ProtonBuffer.java   | 12 +++++++-----
 .../apache/qpid/protonj2/buffer/ProtonBufferAllocator.java   |  2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/protonj2/src/main/java/org/apache/qpid/protonj2/buffer/ProtonBuffer.java b/protonj2/src/main/java/org/apache/qpid/protonj2/buffer/ProtonBuffer.java
index 5b27eef..f729cdc 100644
--- a/protonj2/src/main/java/org/apache/qpid/protonj2/buffer/ProtonBuffer.java
+++ b/protonj2/src/main/java/org/apache/qpid/protonj2/buffer/ProtonBuffer.java
@@ -964,7 +964,7 @@ public interface ProtonBuffer extends Comparable<ProtonBuffer> {
      * Reads bytes from this buffer and writes them into the destination ProtonBuffer incrementing
      * the read index by the value of the number of bytes written to the target.  The number of bytes
      * written will be the equal to the writable bytes of the target buffer.  The write index of the
-     * target buffer must be incremented number of bytes written into it.
+     * target buffer will be incremented by the number of bytes written into it.
      *
      * @param target
      *      The ProtonBuffer to write into.
@@ -979,8 +979,8 @@ public interface ProtonBuffer extends Comparable<ProtonBuffer> {
 
     /**
      * Reads bytes from this buffer and writes them into the destination ProtonBuffer incrementing
-     * the read index by the number of bytes written.  The write index of the target buffer must be
-     * incremented number of bytes written into it.
+     * the read index by the number of bytes written.  The write index of the target buffer will be
+     * incremented by the number of bytes written into it.
      *
      * @param target
      *      The ProtonBuffer to write into.
@@ -997,7 +997,8 @@ public interface ProtonBuffer extends Comparable<ProtonBuffer> {
     /**
      * Transfers this buffer's data to the specified destination starting at
      * the current {@code readIndex} and increases the {@code readIndex}
-     * by the number of the transferred bytes (= {@code length}).
+     * by the number of the transferred bytes (= {@code length}).  This method
+     * does not modify the write index of the target buffer.
      *
      * @param target
      *      The ProtonBuffer to write into.
@@ -1201,7 +1202,8 @@ public interface ProtonBuffer extends Comparable<ProtonBuffer> {
     /**
      * Transfers the specified source buffer's data to this buffer starting at
      * the current {@code writeIndex} and increases the {@code writeIndex}
-     * by the number of the transferred bytes (= {@code length}).
+     * by the number of the transferred bytes (= {@code length}).  This method
+     * does not modify the read index of the source buffer.
      *
      * @param source
      *      The source buffer from which the bytes are read.
diff --git a/protonj2/src/main/java/org/apache/qpid/protonj2/buffer/ProtonBufferAllocator.java b/protonj2/src/main/java/org/apache/qpid/protonj2/buffer/ProtonBufferAllocator.java
index ae8d434..f664991 100644
--- a/protonj2/src/main/java/org/apache/qpid/protonj2/buffer/ProtonBufferAllocator.java
+++ b/protonj2/src/main/java/org/apache/qpid/protonj2/buffer/ProtonBufferAllocator.java
@@ -125,7 +125,7 @@ public interface ProtonBufferAllocator {
      * of the buffer should be that of the length of the wrapped array.
      * <p>
      * The capacity and maximum capacity for the resulting ProtonBuffer should equal
-     * to the length of the wrapped array and the returned array offset is zero.
+     * to the length parameter provided and the returned buffer offset will be zero.
      *
      * @param array
      *      the byte array to wrap.

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org