diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/management/HeapDumpWebEndpoint.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/management/HeapDumpWebEndpoint.java index e252c12b8429..5cb9ec355833 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/management/HeapDumpWebEndpoint.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/management/HeapDumpWebEndpoint.java @@ -126,10 +126,7 @@ private boolean isRunningOnOpenJ9() { return true; } String vmVendor = System.getProperty("java.vm.vendor"); - if (StringUtils.hasLength(vmVendor) && vmVendor.toLowerCase(Locale.ROOT).contains("openj9")) { - return true; - } - return false; + return StringUtils.hasLength(vmVendor) && vmVendor.toLowerCase(Locale.ROOT).contains("openj9"); } /** diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/util/UrlDecoder.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/util/UrlDecoder.java index 575a30f8548d..f455a49a273e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/util/UrlDecoder.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/util/UrlDecoder.java @@ -73,13 +73,11 @@ public static String decode(String string) { private static int fillByteBuffer(ByteBuffer byteBuffer, String string, int index, int length) { byteBuffer.clear(); - while (true) { + do { byteBuffer.put(unescape(string, index)); index += 3; - if (index >= length || string.charAt(index) != '%') { - break; - } } + while (index < length && string.charAt(index) == '%'); byteBuffer.flip(); return index; }