summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-06-25 16:13:37 +0000
committerGerrit Code Review <gerrit@onap.org>2020-06-25 16:13:37 +0000
commit4cdfdf4fa218a3b4f7e9690355db85976bc1888d (patch)
treed234ade24610768d013b34efccfdb0a24b785d3d
parent025d4cdf019ce3d5ca47624072a92e1174c4311e (diff)
parentbfc426d8ca2cc745e2235ca27b79cb1ade36c29c (diff)
Merge "Fix deprecated method in policy-common"
-rw-r--r--policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java5
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 1d1568cc..c367d133 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;
@@ -619,7 +620,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);
}
@@ -632,7 +633,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));
}
}