From 6ceb2b1fbc20bf9c68c288d13c2334b147fa7340 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Thu, 19 Sep 2019 19:07:09 -0400 Subject: [PATCH] Polish removes deprecated method and uses available const. --- .../cloud/gateway/test/FormIntegrationTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/FormIntegrationTests.java b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/FormIntegrationTests.java index 5db4de21..4d55a8c9 100644 --- a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/FormIntegrationTests.java +++ b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/FormIntegrationTests.java @@ -16,7 +16,7 @@ package org.springframework.cloud.gateway.test; -import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.Map; import org.junit.Test; @@ -52,7 +52,7 @@ import static org.springframework.http.MediaType.MULTIPART_FORM_DATA; public class FormIntegrationTests extends BaseWebClientTests { public static final MediaType FORM_URL_ENCODED_CONTENT_TYPE = new MediaType( - APPLICATION_FORM_URLENCODED, Charset.forName("UTF-8")); + APPLICATION_FORM_URLENCODED, StandardCharsets.UTF_8); @Test public void formUrlencodedWorks() { @@ -80,7 +80,7 @@ public class FormIntegrationTests extends BaseWebClientTests { // @formatter:off testClient.post().uri("/post").contentType(MULTIPART_FORM_DATA) - .syncBody(formData) + .bodyValue(formData) .exchange() .expectStatus().isOk() .expectBody(Map.class)