diff options
author | Jim Hahn <jrh3@att.com> | 2020-06-24 15:07:23 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-06-24 15:08:30 -0400 |
commit | bfc426d8ca2cc745e2235ca27b79cb1ade36c29c (patch) | |
tree | 27e7000643344b2e80fccef33acd1fef29a8f669 /policy-endpoints/src/test/java/org | |
parent | 0bf7d4c87390df3cdaf52fba340fb6531c7415db (diff) |
Fix deprecated method in policy-common
Probably due to a jar update, some methods are now deprecated.
Fixed them.
Issue-ID: POLICY-2650
Change-Id: I48aabd4552faaf88671dfbe6556dc739a8c94809
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-endpoints/src/test/java/org')
-rw-r--r-- | policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java index 601c3e9f..690fbd6b 100644 --- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java +++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java @@ -37,6 +37,7 @@ import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; +import java.nio.charset.StandardCharsets; import java.util.UUID; import org.apache.commons.io.IOUtils; import org.junit.AfterClass; @@ -612,7 +613,7 @@ public class HttpServerTest { conn.setDoOutput(true); conn.setRequestProperty("Content-Type", mediaType); conn.setRequestProperty("Accept", mediaType); - IOUtils.write(post, conn.getOutputStream()); + IOUtils.write(post, conn.getOutputStream(), StandardCharsets.UTF_8); return response(conn); } @@ -625,7 +626,7 @@ public class HttpServerTest { */ private String response(URLConnection conn) throws IOException { try (InputStream inpstr = conn.getInputStream()) { - return String.join("", IOUtils.readLines(inpstr)); + return String.join("", IOUtils.readLines(inpstr, StandardCharsets.UTF_8)); } } |