Skip to content

Commit ace7b07

Browse files
committed
fixed accidental change to byte array loop
1 parent fd15924 commit ace7b07

File tree

1 file changed

+2
-1
lines changed
  • org.springframework.web/src/main/java/org/springframework/web/util

1 file changed

+2
-1
lines changed

org.springframework.web/src/main/java/org/springframework/web/util/UriUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,8 @@ private static String encode(String source, String encoding, BitSet notEncoded)
417417
private static byte[] encode(byte[] source, BitSet notEncoded) {
418418
Assert.notNull(source, "'source' must not be null");
419419
ByteArrayOutputStream bos = new ByteArrayOutputStream(source.length * 2);
420-
for (byte b : source) {
420+
for (int i = 0; i < source.length; i++) {
421+
int b = source[i];
421422
if (b < 0) {
422423
b += 256;
423424
}

0 commit comments

Comments
 (0)