From 28707d3de4970c536ae2a9acccf58ac2c06a78d0 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Fri, 8 Jan 2010 21:19:25 +0000 Subject: There is mistake in a commit made for QPID-1830 in rev 891805 Due to the mistake a get operation could reference an index out of bounds or it could print fewer items than what is required. This commit corrects that mistake. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@897323 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/qpid/transport/util/Functions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qpid/java') diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/util/Functions.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/util/Functions.java index 9f1c0ca9eb..5761228642 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/util/Functions.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/util/Functions.java @@ -65,9 +65,9 @@ public class Functions StringBuilder str = new StringBuilder(); str.append('"'); - for (int i = 0; i < min(buf.remaining(), limit); i++) + for (int i = start; i < min(buf.limit(), limit); i++) { - byte c = buf.get(start + i); + byte c = buf.get(i); if (c > 31 && c < 127 && c != '\\') { -- cgit v1.2.1