Skip to content

Commit 5308fe9

Browse files
committed
UrlDecoder reverted
1 parent 5206c61 commit 5308fe9

File tree

2 files changed

+6
-3
lines changed
  • buildSrc/src/main/java/org/springframework/boot/build/bom
  • spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/util

2 files changed

+6
-3
lines changed

buildSrc/src/main/java/org/springframework/boot/build/bom/CheckLinks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void releaseNotes() {
6464
try {
6565
uri = new URI(link);
6666
ResponseEntity<String> response = restTemplate.exchange(uri, HttpMethod.HEAD, null, String.class);
67-
System.out.printf("[%3d] %s - %s (%s)", response.getStatusCode().value(),
67+
System.out.printf("[%3d] %s - %s (%s)%n", response.getStatusCode().value(),
6868
library.getName(), name, uri);
6969
}
7070
catch (URISyntaxException ex) {

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/util/UrlDecoder.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@ public static String decode(String string) {
7373

7474
private static int fillByteBuffer(ByteBuffer byteBuffer, String string, int index, int length) {
7575
byteBuffer.clear();
76-
do {
76+
while (true) {
7777
byteBuffer.put(unescape(string, index));
7878
index += 3;
79-
} while (index < length && string.charAt(index) == '%');
79+
if (index >= length || string.charAt(index) != '%') {
80+
break;
81+
}
82+
}
8083
byteBuffer.flip();
8184
return index;
8285
}

0 commit comments

Comments
 (0)