From 7c73ed69e19351a2d2143aefb5ef3094f62a0317 Mon Sep 17 00:00:00 2001 From: XenoAmess Date: Fri, 3 Jul 2020 18:36:55 +0800 Subject: [PATCH] Use valueOf rather than parseInt as result is assigned to an int See gh-22209 --- .../boot/autoconfigure/web/ServerPropertiesTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java index b0cf8de797..2f8a68f14e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java @@ -519,7 +519,7 @@ class ServerPropertiesTests { template.postForEntity(URI.create("http://localhost:" + jetty.getPort() + "/form"), entity, Void.class); assertThat(failure.get()).isNotNull(); String message = failure.get().getCause().getMessage(); - int defaultMaxPostSize = Integer.valueOf(message.substring(message.lastIndexOf(' ')).trim()); + int defaultMaxPostSize = Integer.parseInt(message.substring(message.lastIndexOf(' ')).trim()); assertThat(this.properties.getJetty().getMaxHttpFormPostSize().toBytes()).isEqualTo(defaultMaxPostSize); } finally {