From ebe3a85a3e9a0bde0b1b57f9c224f82e110a7c4f 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 git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3584 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../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 a40f385d066..62e5aceda10 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; }