aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test/tst/org/eclipse
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-09-29 16:26:31 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2018-09-30 16:59:34 +0900
commita97e79d95d2ae6952f340e649b38000100852a4d (patch)
tree24e5679231aa0b5b747c6b37e6d3636eaf62136b /org.eclipse.jgit.http.test/tst/org/eclipse
parent4316e1c3a9e36e386da8d8d6c663477178a4b663 (diff)
downloadjgit-a97e79d95d2ae6952f340e649b38000100852a4d.tar.gz
jgit-a97e79d95d2ae6952f340e649b38000100852a4d.zip
Explicitly specify charset when constructing PrintWriter
Change-Id: Ie1631784b5eba04edb21f66df284f9e279fd2ec0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.http.test/tst/org/eclipse')
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java
index ad02cd311d..59c2b4e677 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java
@@ -47,8 +47,10 @@ import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import java.io.BufferedReader;
+import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URI;
@@ -83,7 +85,8 @@ public class RegexPipelineTest extends HttpTestCase {
protected void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException {
res.setStatus(200);
- PrintWriter out = new PrintWriter(res.getOutputStream());
+ PrintWriter out = new PrintWriter(new BufferedWriter(
+ new OutputStreamWriter(res.getOutputStream(), UTF_8)));
out.write(name);
out.write("\n");
out.write(String.valueOf(req.getServletPath()));