From ace7b072f1e8c79b478031f82ecb90f93a1dc388 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Sun, 15 Aug 2010 21:43:24 +0000 Subject: [PATCH] fixed accidental change to byte array loop --- .../src/main/java/org/springframework/web/util/UriUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.springframework.web/src/main/java/org/springframework/web/util/UriUtils.java b/org.springframework.web/src/main/java/org/springframework/web/util/UriUtils.java index a40f385d06..62e5aceda1 100644 --- a/org.springframework.web/src/main/java/org/springframework/web/util/UriUtils.java +++ b/org.springframework.web/src/main/java/org/springframework/web/util/UriUtils.java @@ -417,7 +417,8 @@ public abstract class UriUtils { private static byte[] encode(byte[] source, BitSet notEncoded) { Assert.notNull(source, "'source' must not be null"); ByteArrayOutputStream bos = new ByteArrayOutputStream(source.length * 2); - for (byte b : source) { + for (int i = 0; i < source.length; i++) { + int b = source[i]; if (b < 0) { b += 256; }